diff options
| author | Tom Lane | 2002-08-27 04:55:12 +0000 |
|---|---|---|
| committer | Tom Lane | 2002-08-27 04:55:12 +0000 |
| commit | 28e82066a1d17dce2c28ca5391dab1e4f1eb0c0f (patch) | |
| tree | 2204fa82946fd20ffaf10fd498de0c921ea301eb /src/backend/tcop | |
| parent | bc8f725a4aa4e2118caaf9e7c4fe3cc5632a02c0 (diff) | |
PREPARE/EXECUTE statements. Patch by Neil Conway, some kibitzing
from Tom Lane.
Diffstat (limited to 'src/backend/tcop')
| -rw-r--r-- | src/backend/tcop/postgres.c | 16 | ||||
| -rw-r--r-- | src/backend/tcop/utility.c | 25 |
2 files changed, 30 insertions, 11 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 605f44ba70b..28576b8fad6 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.283 2002/08/17 15:12:07 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.284 2002/08/27 04:55:11 tgl Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -1666,7 +1666,7 @@ PostgresMain(int argc, char *argv[], const char *username) if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.283 $ $Date: 2002/08/17 15:12:07 $\n"); + puts("$Revision: 1.284 $ $Date: 2002/08/27 04:55:11 $\n"); } /* @@ -2406,6 +2406,18 @@ CreateCommandTag(Node *parsetree) tag = "DROP OPERATOR CLASS"; break; + case T_PrepareStmt: + tag = "PREPARE"; + break; + + case T_ExecuteStmt: + tag = "EXECUTE"; + break; + + case T_DeallocateStmt: + tag = "DEALLOCATE"; + break; + default: elog(LOG, "CreateCommandTag: unknown parse node type %d", nodeTag(parsetree)); diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 1ae0a89fd6b..b16adef54db 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.172 2002/08/17 13:04:15 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.173 2002/08/27 04:55:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -30,6 +30,7 @@ #include "commands/explain.h" #include "commands/lockcmds.h" #include "commands/portalcmds.h" +#include "commands/prepare.h" #include "commands/proclang.h" #include "commands/schemacmds.h" #include "commands/sequence.h" @@ -379,6 +380,18 @@ ProcessUtility(Node *parsetree, } break; + case T_PrepareStmt: + PrepareQuery((PrepareStmt *) parsetree); + break; + + case T_ExecuteStmt: + ExecuteQuery((ExecuteStmt *) parsetree, dest); + break; + + case T_DeallocateStmt: + DeallocateQuery((DeallocateStmt *) parsetree); + break; + /* * schema */ @@ -541,11 +554,7 @@ ProcessUtility(Node *parsetree, case T_GrantStmt: - { - GrantStmt *stmt = (GrantStmt *) parsetree; - - ExecuteGrantStmt(stmt); - } + ExecuteGrantStmt((GrantStmt *) parsetree); break; /* @@ -841,9 +850,7 @@ ProcessUtility(Node *parsetree, break; case T_CreateConversionStmt: - { - CreateConversionCommand((CreateConversionStmt *) parsetree); - } + CreateConversionCommand((CreateConversionStmt *) parsetree); break; case T_CreateCastStmt: |
