aboutsummaryrefslogtreecommitdiff
path: root/src/backend/nodes/copyfuncs.c
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2005-03-14 00:19:37 +0000
committerNeil Conway <neilc@samurai.com>2005-03-14 00:19:37 +0000
commitc06965544188244efa703f6a97f3088a291d57b5 (patch)
tree3bb6f3068d418b4ef98828db4f856e852c02df20 /src/backend/nodes/copyfuncs.c
parent41e2a80f570bf0e8e68d0eef7d1510e5ec32b3ae (diff)
downloadpostgresql-c06965544188244efa703f6a97f3088a291d57b5.tar.gz
postgresql-c06965544188244efa703f6a97f3088a291d57b5.zip
Allow ALTER FUNCTION to change a function's strictness, volatility, and
whether or not it is a security definer. Changing a function's strictness is required by SQL2003, and the other capabilities make sense. Also, allow an optional RESTRICT noise word to be specified, for SQL conformance. Some trivial regression tests added and the documentation has been updated.
Diffstat (limited to 'src/backend/nodes/copyfuncs.c')
-rw-r--r--src/backend/nodes/copyfuncs.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c
index 4acf02908b6..92f7168ae9f 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
- * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.297 2005/03/10 23:21:21 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.298 2005/03/14 00:19:36 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1892,6 +1892,17 @@ _copyFunctionParameter(FunctionParameter *from)
return newnode;
}
+static AlterFunctionStmt *
+_copyAlterFunctionStmt(AlterFunctionStmt *from)
+{
+ AlterFunctionStmt *newnode = makeNode(AlterFunctionStmt);
+
+ COPY_NODE_FIELD(func);
+ COPY_NODE_FIELD(actions);
+
+ return newnode;
+}
+
static RemoveAggrStmt *
_copyRemoveAggrStmt(RemoveAggrStmt *from)
{
@@ -2882,6 +2893,9 @@ copyObject(void *from)
case T_FunctionParameter:
retval = _copyFunctionParameter(from);
break;
+ case T_AlterFunctionStmt:
+ retval = _copyAlterFunctionStmt(from);
+ break;
case T_RemoveAggrStmt:
retval = _copyRemoveAggrStmt(from);
break;