aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2001-04-14 19:11:45 +0000
committerBruce Momjian <bruce@momjian.us>2001-04-14 19:11:45 +0000
commit25efda227d2a3f8036f125c91f93d77304586181 (patch)
tree1ede774b0e650ae0c0a25b8204ae6cb1c93b0dea /src/backend/tcop/postgres.c
parent232d8fa3c47f9392cd1ad5112e032fafca0e950c (diff)
downloadpostgresql-25efda227d2a3f8036f125c91f93d77304586181.tar.gz
postgresql-25efda227d2a3f8036f125c91f93d77304586181.zip
Add debug_query_string global variable for pgmonitor and debugging use.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index ff9b614553a..19a44ff67d7 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.217 2001/03/26 17:00:54 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.218 2001/04/14 19:11:45 momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@@ -74,6 +74,8 @@
extern int optind;
extern char *optarg;
+char *debug_query_string; /* used by pgmonitor */
+
/*
* for ps display
*/
@@ -615,6 +617,8 @@ pg_exec_query_string(char *query_string, /* string to execute */
List *parsetree_list,
*parsetree_item;
+ debug_query_string = query_string; /* used by pgmonitor */
+
/*
* Start up a transaction command. All queries generated by the
* query_string will be in this same command block, *unless* we find a
@@ -853,6 +857,8 @@ pg_exec_query_string(char *query_string, /* string to execute */
*/
if (xact_started)
finish_xact_command();
+
+ debug_query_string = NULL; /* used by pgmonitor */
}
/*
@@ -1703,7 +1709,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
if (!IsUnderPostmaster)
{
puts("\nPOSTGRES backend interactive interface ");
- puts("$Revision: 1.217 $ $Date: 2001/03/26 17:00:54 $\n");
+ puts("$Revision: 1.218 $ $Date: 2001/04/14 19:11:45 $\n");
}
/*
@@ -1729,7 +1735,6 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
if (sigsetjmp(Warn_restart, 1) != 0)
{
-
/*
* NOTE: if you are tempted to add more code in this if-block,
* consider the probability that it should be in
@@ -1744,6 +1749,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha
QueryCancelPending = false;
InterruptHoldoffCount = 1;
CritSectionCount = 0; /* should be unnecessary, but... */
+ debug_query_string = NULL; /* used by pgmonitor */
/*
* Make sure we are in a valid memory context during recovery.