Index: src/backend/tcop/postgres.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/backend/tcop/postgres.c,v
retrieving revision 1.211
diff -c -r1.211 postgres.c
*** src/backend/tcop/postgres.c	2001/03/14 15:14:35	1.211
--- src/backend/tcop/postgres.c	2001/03/14 16:29:26
***************
*** 74,79 ****
--- 74,81 ----
  extern int optind;
  extern char *optarg;
  
+ char *debug_query_string;		/* used by pgmonitor */
+ 
  /*
   * for ps display
   */
***************
*** 621,626 ****
--- 623,630 ----
  	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
***************
*** 855,860 ****
--- 859,866 ----
  	 */
  	if (xact_started)
  		finish_xact_command();
+ 
+ 	debug_query_string = NULL;		/* used by pgmonitor */
  }
  
  /*
***************
*** 1718,1723 ****
--- 1724,1731 ----
  
  	if (sigsetjmp(Warn_restart, 1) != 0)
  	{
+ 		debug_query_string = NULL;		/* used by pgmonitor */
+ 
  		/*
  		 * NOTE: if you are tempted to add more code in this if-block,
  		 * consider the probability that it should be in AbortTransaction()
