summaryrefslogtreecommitdiff
path: root/src/backend/commands/define.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-02-12 20:07:21 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-02-12 20:07:21 +0000
commitaa88e59ade282c41dd03a1ab386a0a408e4a43af (patch)
tree098c0784df02fbc9bba8fccd23809cd35cc8a451 /src/backend/commands/define.c
parentd8c4cb740c9a828fb7a0580e8ce987d2ada9524c (diff)
Rearrange order of operations in heap_create_with_catalog so that if
two transactions create the same table name concurrently, the one that fails will complain about unique index pg_class_relname_index, rather than about pg_type_typname_index which'll confuse most people. Free side benefit: pg_class.reltype is correctly linked to the pg_type entry now. It's been zero in all but the preloaded pg_class entries since who knows when.
Diffstat (limited to 'src/backend/commands/define.c')
-rw-r--r--src/backend/commands/define.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/commands/define.c b/src/backend/commands/define.c
index 01fd53a16a9..4f5f8a47f64 100644
--- a/src/backend/commands/define.c
+++ b/src/backend/commands/define.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.51 2001/01/24 19:42:52 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.52 2001/02/12 20:07:21 tgl Exp $
*
* DESCRIPTION
* The "DefineFoo" routines take the parse tree and pick out the
@@ -640,6 +640,7 @@ DefineType(char *typeName, List *parameters)
* ----------------
*/
TypeCreate(typeName, /* type name */
+ InvalidOid, /* preassigned type oid (not done here) */
InvalidOid, /* relation oid (n/a here) */
internalLength, /* internal size */
externalLength, /* external size */
@@ -652,7 +653,7 @@ DefineType(char *typeName, List *parameters)
elemName, /* element type name */
defaultValue, /* default type value */
byValue, /* passed by value */
- alignment,
+ alignment, /* required alignment */
storage); /* TOAST strategy */
/* ----------------
@@ -663,6 +664,7 @@ DefineType(char *typeName, List *parameters)
shadow_type = makeArrayTypeName(typeName);
TypeCreate(shadow_type, /* type name */
+ InvalidOid, /* preassigned type oid (not done here) */
InvalidOid, /* relation oid (n/a here) */
-1, /* internal size */
-1, /* external size */