summaryrefslogtreecommitdiff
path: root/src/backend/nodes/makefuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/nodes/makefuncs.c')
-rw-r--r--src/backend/nodes/makefuncs.c16
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;
}