diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2010-10-25 21:40:46 +0300 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2010-10-25 21:44:49 +0300 |
commit | 35670340f57d78d6ab023b1fb42fd81339f85d4c (patch) | |
tree | 353a103641ea21787ace05801ebc9f2a42e61137 /src/backend/commands/opclasscmds.c | |
parent | c6873eac4c33720140240cdbd1a663fecc922c57 (diff) | |
download | postgresql-35670340f57d78d6ab023b1fb42fd81339f85d4c.tar.gz postgresql-35670340f57d78d6ab023b1fb42fd81339f85d4c.zip |
Refactor typenameTypeId()
Split the old typenameTypeId() into two functions: A new typenameTypeId() that
returns only a type OID, and typenameTypeIdAndMod() that returns type OID and
typmod. This isolates call sites better that actually care about the typmod.
Diffstat (limited to 'src/backend/commands/opclasscmds.c')
-rw-r--r-- | src/backend/commands/opclasscmds.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c index ea66e95ec70..8c493363166 100644 --- a/src/backend/commands/opclasscmds.c +++ b/src/backend/commands/opclasscmds.c @@ -398,7 +398,7 @@ DefineOpClass(CreateOpClassStmt *stmt) errmsg("must be superuser to create an operator class"))); /* Look up the datatype */ - typeoid = typenameTypeId(NULL, stmt->datatype, NULL); + typeoid = typenameTypeId(NULL, stmt->datatype); #ifdef NOT_USED /* XXX this is unnecessary given the superuser check above */ @@ -540,7 +540,7 @@ DefineOpClass(CreateOpClassStmt *stmt) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), errmsg("storage type specified more than once"))); - storageoid = typenameTypeId(NULL, item->storedtype, NULL); + storageoid = typenameTypeId(NULL, item->storedtype); #ifdef NOT_USED /* XXX this is unnecessary given the superuser check above */ @@ -1009,12 +1009,12 @@ processTypesSpec(List *args, Oid *lefttype, Oid *righttype) Assert(args != NIL); typeName = (TypeName *) linitial(args); - *lefttype = typenameTypeId(NULL, typeName, NULL); + *lefttype = typenameTypeId(NULL, typeName); if (list_length(args) > 1) { typeName = (TypeName *) lsecond(args); - *righttype = typenameTypeId(NULL, typeName, NULL); + *righttype = typenameTypeId(NULL, typeName); } else *righttype = *lefttype; |