Index: src/backend/tcop/postgres.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/tcop/postgres.c,v
retrieving revision 1.215
diff -c -r1.215 postgres.c
*** src/backend/tcop/postgres.c	2001/03/23 18:26:01	1.215
--- src/backend/tcop/postgres.c	2001/03/25 00:17:09
***************
*** 74,79 ****
--- 74,81 ----
  extern int	optind;
  extern char *optarg;
  
+ char *debug_query_string;		/* used by pgmonitor */
+ 
  /*
   * for ps display
   */
***************
*** 615,620 ****
--- 617,624 ----
  	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,858 ****
--- 857,864 ----
  	 */
  	if (xact_started)
  		finish_xact_command();
+ 
+ 	debug_query_string = NULL;		/* used by pgmonitor */
  }
  
  /*
***************
*** 1729,1735 ****
  
  	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
--- 1735,1740 ----
***************
*** 1744,1749 ****
--- 1749,1755 ----
  		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.
