mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
For some reason, CREATE TYPE has only accepted alignment specifications
of 'int4' and 'double'. Add 'char' and 'int2' to allow user-defined types to access the full set of supported alignments.
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.217 2001/08/03 19:43:05 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.218 2001/08/03 20:47:40 tgl Exp $
|
||||
*
|
||||
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
|
||||
*
|
||||
@@ -3190,19 +3190,22 @@ dumpTypes(Archive *fout, FuncInfo *finfo, int numFuncs,
|
||||
(*deps)[depIdx++] = strdup(tinfo[i].typelem);
|
||||
}
|
||||
|
||||
/* XXX these are all the aligns currently handled by DefineType */
|
||||
if (strcmp(tinfo[i].typalign, "i") == 0)
|
||||
if (strcmp(tinfo[i].typalign, "c") == 0)
|
||||
appendPQExpBuffer(q, ", alignment = char");
|
||||
else if (strcmp(tinfo[i].typalign, "s") == 0)
|
||||
appendPQExpBuffer(q, ", alignment = int2");
|
||||
else if (strcmp(tinfo[i].typalign, "i") == 0)
|
||||
appendPQExpBuffer(q, ", alignment = int4");
|
||||
else if (strcmp(tinfo[i].typalign, "d") == 0)
|
||||
appendPQExpBuffer(q, ", alignment = double");
|
||||
|
||||
if (strcmp(tinfo[i].typstorage, "p") == 0)
|
||||
appendPQExpBuffer(q, ", storage = plain");
|
||||
if (strcmp(tinfo[i].typstorage, "e") == 0)
|
||||
else if (strcmp(tinfo[i].typstorage, "e") == 0)
|
||||
appendPQExpBuffer(q, ", storage = external");
|
||||
if (strcmp(tinfo[i].typstorage, "x") == 0)
|
||||
else if (strcmp(tinfo[i].typstorage, "x") == 0)
|
||||
appendPQExpBuffer(q, ", storage = extended");
|
||||
if (strcmp(tinfo[i].typstorage, "m") == 0)
|
||||
else if (strcmp(tinfo[i].typstorage, "m") == 0)
|
||||
appendPQExpBuffer(q, ", storage = main");
|
||||
|
||||
if (tinfo[i].passedbyvalue)
|
||||
|
Reference in New Issue
Block a user