aboutsummaryrefslogtreecommitdiff
path: root/src/backend/nodes/copyfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-04-09 20:35:55 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-04-09 20:35:55 +0000
commitf2d70d32ebd6c38d4fe93c1a684f5f29e5e76938 (patch)
tree5d041018177cdf6e9ca3ef0cc2eafac580a5bb0b /src/backend/nodes/copyfuncs.c
parentc419c224142eb4bbf6e9a47d2d3626f212fda0fc (diff)
downloadpostgresql-f2d70d32ebd6c38d4fe93c1a684f5f29e5e76938.tar.gz
postgresql-f2d70d32ebd6c38d4fe93c1a684f5f29e5e76938.zip
Functions live in namespaces. Qualified function names work, eg
SELECT schema1.func2(...). Aggregate names can be qualified at the syntactic level, but the qualification is ignored for the moment.
Diffstat (limited to 'src/backend/nodes/copyfuncs.c')
-rw-r--r--src/backend/nodes/copyfuncs.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c
index b633b02b79d..873658774ca 100644
--- a/src/backend/nodes/copyfuncs.c
+++ b/src/backend/nodes/copyfuncs.c
@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.175 2002/04/05 11:56:48 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.176 2002/04/09 20:35:49 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1587,8 +1587,7 @@ _copyFuncCall(FuncCall *from)
{
FuncCall *newnode = makeNode(FuncCall);
- if (from->funcname)
- newnode->funcname = pstrdup(from->funcname);
+ Node_Copy(from, newnode, funcname);
Node_Copy(from, newnode, args);
newnode->agg_star = from->agg_star;
newnode->agg_distinct = from->agg_distinct;
@@ -1719,6 +1718,7 @@ _copyIndexElem(IndexElem *from)
if (from->name)
newnode->name = pstrdup(from->name);
+ Node_Copy(from, newnode, funcname);
Node_Copy(from, newnode, args);
if (from->class)
newnode->class = pstrdup(from->class);
@@ -1940,8 +1940,7 @@ _copyFuncWithArgs(FuncWithArgs *from)
{
FuncWithArgs *newnode = makeNode(FuncWithArgs);
- if (from->funcname)
- newnode->funcname = pstrdup(from->funcname);
+ Node_Copy(from, newnode, funcname);
Node_Copy(from, newnode, funcargs);
return newnode;
@@ -2052,13 +2051,10 @@ _copyCommentStmt(CommentStmt *from)
CommentStmt *newnode = makeNode(CommentStmt);
newnode->objtype = from->objtype;
- if (from->objschema)
- newnode->objschema = pstrdup(from->objschema);
- newnode->objname = pstrdup(from->objname);
- if (from->objproperty)
- newnode->objproperty = pstrdup(from->objproperty);
- Node_Copy(from, newnode, objlist);
- newnode->comment = pstrdup(from->comment);
+ Node_Copy(from, newnode, objname);
+ Node_Copy(from, newnode, objargs);
+ if (from->comment)
+ newnode->comment = pstrdup(from->comment);
return newnode;
}
@@ -2114,7 +2110,7 @@ _copyRemoveAggrStmt(RemoveAggrStmt *from)
{
RemoveAggrStmt *newnode = makeNode(RemoveAggrStmt);
- newnode->aggname = pstrdup(from->aggname);
+ Node_Copy(from, newnode, aggname);
Node_Copy(from, newnode, aggtype);
return newnode;
@@ -2125,7 +2121,7 @@ _copyRemoveFuncStmt(RemoveFuncStmt *from)
{
RemoveFuncStmt *newnode = makeNode(RemoveFuncStmt);
- newnode->funcname = pstrdup(from->funcname);
+ Node_Copy(from, newnode, funcname);
Node_Copy(from, newnode, args);
return newnode;
@@ -2370,8 +2366,7 @@ _copyCreateTrigStmt(CreateTrigStmt *from)
if (from->trigname)
newnode->trigname = pstrdup(from->trigname);
Node_Copy(from, newnode, relation);
- if (from->funcname)
- newnode->funcname = pstrdup(from->funcname);
+ Node_Copy(from, newnode, funcname);
Node_Copy(from, newnode, args);
newnode->before = from->before;
newnode->row = from->row;
@@ -2411,8 +2406,7 @@ _copyCreatePLangStmt(CreatePLangStmt *from)
if (from->plname)
newnode->plname = pstrdup(from->plname);
- if (from->plhandler)
- newnode->plhandler = pstrdup(from->plhandler);
+ Node_Copy(from, newnode, plhandler);
if (from->plcompiler)
newnode->plcompiler = pstrdup(from->plcompiler);
newnode->pltrusted = from->pltrusted;