diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-12-30 21:21:56 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-12-30 21:21:56 +0000 |
commit | 5725b9d9afc8c3ba24e94cbc7020889fe8ad7ef9 (patch) | |
tree | e1c8a77dbb660fa0de36528f19dc4f3cb81829d2 /src/backend/nodes/makefuncs.c | |
parent | 24b1f14eae0b83ef5d6b269ebf1ecae2f3acbb8c (diff) | |
download | postgresql-5725b9d9afc8c3ba24e94cbc7020889fe8ad7ef9.tar.gz |
Support type modifiers for user-defined types, and pull most knowledge
about typmod representation for standard types out into type-specific
typmod I/O functions. Teodor Sigaev, with some editorialization by
Tom Lane.
Diffstat (limited to 'src/backend/nodes/makefuncs.c')
-rw-r--r-- | src/backend/nodes/makefuncs.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/backend/nodes/makefuncs.c b/src/backend/nodes/makefuncs.c index 9f6aa22707..277103e4a1 100644 --- a/src/backend/nodes/makefuncs.c +++ b/src/backend/nodes/makefuncs.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/makefuncs.c,v 1.52 2006/10/04 00:29:53 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/makefuncs.c,v 1.53 2006/12/30 21:21:53 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -262,12 +262,7 @@ makeRangeVar(char *schemaname, char *relname) TypeName * makeTypeName(char *typnam) { - TypeName *n = makeNode(TypeName); - - n->names = list_make1(makeString(typnam)); - n->typmod = -1; - n->location = -1; - return n; + return makeTypeNameFromNameList(list_make1(makeString(typnam))); } /* @@ -282,14 +277,15 @@ makeTypeNameFromNameList(List *names) TypeName *n = makeNode(TypeName); n->names = names; - n->typmod = -1; + n->typmods = NIL; + n->typemod = -1; n->location = -1; return n; } /* * makeTypeNameFromOid - - * build a TypeName node to represent a type already known by OID. + * build a TypeName node to represent a type already known by OID/typmod. */ TypeName * makeTypeNameFromOid(Oid typeid, int32 typmod) @@ -297,7 +293,7 @@ makeTypeNameFromOid(Oid typeid, int32 typmod) TypeName *n = makeNode(TypeName); n->typeid = typeid; - n->typmod = typmod; + n->typemod = typmod; n->location = -1; return n; } |