From c06965544188244efa703f6a97f3088a291d57b5 Mon Sep 17 00:00:00 2001 From: Neil Conway Date: Mon, 14 Mar 2005 00:19:37 +0000 Subject: 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. --- src/backend/nodes/copyfuncs.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/backend/nodes/copyfuncs.c') 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; -- cgit v1.2.3