diff options
| author | Neil Conway | 2007-04-26 16:13:15 +0000 |
|---|---|---|
| committer | Neil Conway | 2007-04-26 16:13:15 +0000 |
| commit | 16efdb5ec7f28bed9541fc773330e3e2ebe2ed9a (patch) | |
| tree | 6ec0d0c7b08584ef53bf340e4d71a156e9655eba /src/backend/nodes | |
| parent | 5ea27a4b2812d148f2516d130aee9dbaba45cedc (diff) | |
Rename the newly-added commands for discarding session state.
RESET SESSION, RESET PLANS, and RESET TEMP are now DISCARD ALL,
DISCARD PLANS, and DISCARD TEMP, respectively. This is to avoid
confusion with the pre-existing RESET variants: the DISCARD
commands are not actually similar to RESET. Patch from Marko
Kreen, with some minor editorialization.
Diffstat (limited to 'src/backend/nodes')
| -rw-r--r-- | src/backend/nodes/copyfuncs.c | 15 | ||||
| -rw-r--r-- | src/backend/nodes/equalfuncs.c | 13 |
2 files changed, 26 insertions, 2 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 9bf57fb87f..988120a963 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.373 2007/04/02 03:49:38 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.374 2007/04/26 16:13:10 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -2589,6 +2589,16 @@ _copyVariableResetStmt(VariableResetStmt *from) return newnode; } +static DiscardStmt * +_copyDiscardStmt(DiscardStmt *from) +{ + DiscardStmt *newnode = makeNode(DiscardStmt); + + COPY_SCALAR_FIELD(target); + + return newnode; +} + static CreateTableSpaceStmt * _copyCreateTableSpaceStmt(CreateTableSpaceStmt *from) { @@ -3380,6 +3390,9 @@ copyObject(void *from) case T_VariableResetStmt: retval = _copyVariableResetStmt(from); break; + case T_DiscardStmt: + retval = _copyDiscardStmt(from); + break; case T_CreateTableSpaceStmt: retval = _copyCreateTableSpaceStmt(from); break; diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index 1cc0c343dc..c1500948dc 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -18,7 +18,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.304 2007/04/02 03:49:38 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/nodes/equalfuncs.c,v 1.305 2007/04/26 16:13:11 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -1377,6 +1377,14 @@ _equalVariableResetStmt(VariableResetStmt *a, VariableResetStmt *b) } static bool +_equalDiscardStmt(DiscardStmt *a, DiscardStmt *b) +{ + COMPARE_SCALAR_FIELD(target); + + return true; +} + +static bool _equalCreateTableSpaceStmt(CreateTableSpaceStmt *a, CreateTableSpaceStmt *b) { COMPARE_STRING_FIELD(tablespacename); @@ -2313,6 +2321,9 @@ equal(void *a, void *b) case T_VariableResetStmt: retval = _equalVariableResetStmt(a, b); break; + case T_DiscardStmt: + retval = _equalDiscardStmt(a, b); + break; case T_CreateTableSpaceStmt: retval = _equalCreateTableSpaceStmt(a, b); break; |
