aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/utility.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/tcop/utility.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/tcop/utility.c')
-rw-r--r--src/backend/tcop/utility.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index 006f904f72e..a3b946647ac 100644
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.233 2005/01/27 03:18:10 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.234 2005/03/14 00:19:36 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@@ -277,6 +277,7 @@ check_xact_readonly(Node *parsetree)
{
case T_AlterDatabaseSetStmt:
case T_AlterDomainStmt:
+ case T_AlterFunctionStmt:
case T_AlterGroupStmt:
case T_AlterOwnerStmt:
case T_AlterSeqStmt:
@@ -711,6 +712,10 @@ ProcessUtility(Node *parsetree,
CreateFunction((CreateFunctionStmt *) parsetree);
break;
+ case T_AlterFunctionStmt: /* ALTER FUNCTION */
+ AlterFunction((AlterFunctionStmt *) parsetree);
+ break;
+
case T_IndexStmt: /* CREATE INDEX */
{
IndexStmt *stmt = (IndexStmt *) parsetree;
@@ -1394,10 +1399,15 @@ CreateCommandTag(Node *parsetree)
tag = "ALTER TABLE";
}
break;
+
case T_AlterDomainStmt:
tag = "ALTER DOMAIN";
break;
+ case T_AlterFunctionStmt:
+ tag = "ALTER FUNCTION";
+ break;
+
case T_GrantStmt:
{
GrantStmt *stmt = (GrantStmt *) parsetree;