mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Support SET FROM CURRENT in CREATE/ALTER FUNCTION, ALTER DATABASE, ALTER ROLE.
(Actually, it works as a plain statement too, but I didn't document that because it seems a bit useless.) Unify VariableResetStmt with VariableSetStmt, and clean up some ancient cruft in the representation of same.
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.381 2007/08/31 01:44:05 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.382 2007/09/03 18:46:30 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -2525,8 +2525,7 @@ _copyAlterDatabaseSetStmt(AlterDatabaseSetStmt *from)
|
||||
AlterDatabaseSetStmt *newnode = makeNode(AlterDatabaseSetStmt);
|
||||
|
||||
COPY_STRING_FIELD(dbname);
|
||||
COPY_STRING_FIELD(variable);
|
||||
COPY_NODE_FIELD(value);
|
||||
COPY_NODE_FIELD(setstmt);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
@ -2597,6 +2596,7 @@ _copyVariableSetStmt(VariableSetStmt *from)
|
||||
{
|
||||
VariableSetStmt *newnode = makeNode(VariableSetStmt);
|
||||
|
||||
COPY_SCALAR_FIELD(kind);
|
||||
COPY_STRING_FIELD(name);
|
||||
COPY_NODE_FIELD(args);
|
||||
COPY_SCALAR_FIELD(is_local);
|
||||
@ -2614,16 +2614,6 @@ _copyVariableShowStmt(VariableShowStmt *from)
|
||||
return newnode;
|
||||
}
|
||||
|
||||
static VariableResetStmt *
|
||||
_copyVariableResetStmt(VariableResetStmt *from)
|
||||
{
|
||||
VariableResetStmt *newnode = makeNode(VariableResetStmt);
|
||||
|
||||
COPY_STRING_FIELD(name);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
|
||||
static DiscardStmt *
|
||||
_copyDiscardStmt(DiscardStmt *from)
|
||||
{
|
||||
@ -2746,8 +2736,7 @@ _copyAlterRoleSetStmt(AlterRoleSetStmt *from)
|
||||
AlterRoleSetStmt *newnode = makeNode(AlterRoleSetStmt);
|
||||
|
||||
COPY_STRING_FIELD(role);
|
||||
COPY_STRING_FIELD(variable);
|
||||
COPY_NODE_FIELD(value);
|
||||
COPY_NODE_FIELD(setstmt);
|
||||
|
||||
return newnode;
|
||||
}
|
||||
@ -3428,9 +3417,6 @@ copyObject(void *from)
|
||||
case T_VariableShowStmt:
|
||||
retval = _copyVariableShowStmt(from);
|
||||
break;
|
||||
case T_VariableResetStmt:
|
||||
retval = _copyVariableResetStmt(from);
|
||||
break;
|
||||
case T_DiscardStmt:
|
||||
retval = _copyDiscardStmt(from);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user