aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/typecmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/typecmds.c')
-rw-r--r--src/backend/commands/typecmds.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c
index ca87b15068f..03e08f1b4c0 100644
--- a/src/backend/commands/typecmds.c
+++ b/src/backend/commands/typecmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.131 2009/02/02 19:31:39 alvherre Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.132 2009/02/24 01:38:09 tgl Exp $
*
* DESCRIPTION
* The "DefineFoo" routines take the parse tree and pick out the
@@ -199,7 +199,7 @@ DefineType(List *names, List *parameters)
*/
if (!OidIsValid(typoid))
{
- typoid = TypeShellMake(typeName, typeNamespace);
+ typoid = TypeShellMake(typeName, typeNamespace, GetUserId());
/* Make new shell type visible for modification below */
CommandCounterIncrement();
@@ -536,6 +536,7 @@ DefineType(List *names, List *parameters)
typeNamespace, /* namespace */
InvalidOid, /* relation oid (n/a here) */
0, /* relation kind (ditto) */
+ GetUserId(), /* owner's ID */
internalLength, /* internal size */
TYPTYPE_BASE, /* type-type (base type) */
category, /* type-category */
@@ -574,6 +575,7 @@ DefineType(List *names, List *parameters)
typeNamespace, /* namespace */
InvalidOid, /* relation oid (n/a here) */
0, /* relation kind (ditto) */
+ GetUserId(), /* owner's ID */
-1, /* internal size (always varlena) */
TYPTYPE_BASE, /* type-type (base type) */
TYPCATEGORY_ARRAY, /* type-category (array) */
@@ -1018,6 +1020,7 @@ DefineDomain(CreateDomainStmt *stmt)
domainNamespace, /* namespace */
InvalidOid, /* relation oid (n/a here) */
0, /* relation kind (ditto) */
+ GetUserId(), /* owner's ID */
internalLength, /* internal size */
TYPTYPE_DOMAIN, /* type-type (domain type) */
category, /* type-category */
@@ -1131,6 +1134,7 @@ DefineEnum(CreateEnumStmt *stmt)
enumNamespace, /* namespace */
InvalidOid, /* relation oid (n/a here) */
0, /* relation kind (ditto) */
+ GetUserId(), /* owner's ID */
sizeof(Oid), /* internal size */
TYPTYPE_ENUM, /* type-type (enum type) */
TYPCATEGORY_ENUM, /* type-category (enum type) */
@@ -1169,6 +1173,7 @@ DefineEnum(CreateEnumStmt *stmt)
enumNamespace, /* namespace */
InvalidOid, /* relation oid (n/a here) */
0, /* relation kind (ditto) */
+ GetUserId(), /* owner's ID */
-1, /* internal size (always varlena) */
TYPTYPE_BASE, /* type-type (base type) */
TYPCATEGORY_ARRAY, /* type-category (array) */