diff options
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 61fdf9c5acf..cfaaf556dd0 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.248 2002/02/26 22:47:08 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.249 2002/02/27 19:35:12 tgl Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -646,6 +646,18 @@ pg_exec_query_string(char *query_string, /* string to execute */ isTransactionStmt = IsA(parsetree, TransactionStmt); /* + * First we set the command-completion tag to the main query + * (as opposed to each of the others that may be generated by + * analyze and rewrite). Also set ps_status and do any special + * start-of-SQL-command processing needed by the destination. + */ + commandTag = CreateCommandTag(parsetree); + + set_ps_display(commandTag); + + BeginCommand(commandTag, dest); + + /* * If we are in an aborted transaction, ignore all commands except * COMMIT/ABORT. It is important that this test occur before we * try to do parse analysis, rewrite, or planning, since all those @@ -707,18 +719,7 @@ pg_exec_query_string(char *query_string, /* string to execute */ /* * OK to analyze and rewrite this query. - */ - - /* - * First we set the command-completion tag to the main query - * (as opposed to each of the others that may be generated by - * analyze and rewrite). Also set ps_status to the main query tag. - */ - commandTag = CreateCommandTag(parsetree); - - set_ps_display(commandTag); - - /* + * * Switch to appropriate context for constructing querytrees (again, * these must outlive the execution context). */ @@ -1688,7 +1689,7 @@ PostgresMain(int argc, char *argv[], const char *username) if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.248 $ $Date: 2002/02/26 22:47:08 $\n"); + puts("$Revision: 1.249 $ $Date: 2002/02/27 19:35:12 $\n"); } /* |