Index: src/backend/tcop/postgres.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/tcop/postgres.c,v
retrieving revision 1.493
diff -c -c -r1.493 postgres.c
*** src/backend/tcop/postgres.c	29 Jul 2006 03:02:56 -0000	1.493
--- src/backend/tcop/postgres.c	4 Aug 2006 18:50:59 -0000
***************
*** 1146,1153 ****
  
  	if (log_statement == LOGSTMT_ALL)
  		ereport(LOG,
! 				(errmsg("statement: [protocol] PREPARE %s AS %s",
! 						(*stmt_name != '\0') ? stmt_name : "<unnamed>",
  						query_string)));
  
  	/*
--- 1146,1153 ----
  
  	if (log_statement == LOGSTMT_ALL)
  		ereport(LOG,
! 				(errmsg("statement: <protocol> PREPARE %s AS %s",
! 						*stmt_name ? stmt_name : "<unnamed>",
  						query_string)));
  
  	/*
***************
*** 1452,1458 ****
  	/* We need to output the parameter values someday */
  	if (log_statement == LOGSTMT_ALL)
  		ereport(LOG,
! 				(errmsg("statement: [protocol] <BIND> %s", portal_name)));
  
  	/*
  	 * Fetch parameters, if any, and store in the portal's memory context.
--- 1452,1460 ----
  	/* We need to output the parameter values someday */
  	if (log_statement == LOGSTMT_ALL)
  		ereport(LOG,
! 				(errmsg("statement: <protocol> <BIND> %s  [PREPARE:  %s]",
! 						*portal_name ? portal_name : "<unnamed>",
! 						portal->sourceText ? portal->sourceText : "")));
  
  	/*
  	 * Fetch parameters, if any, and store in the portal's memory context.
***************
*** 1718,1726 ****
  	if (log_statement == LOGSTMT_ALL)
  		/* We have the portal, so output the source query. */
  		ereport(LOG,
! 				(errmsg("statement: [protocol] %sEXECUTE %s  [PREPARE:  %s]",
  						execute_is_fetch ? "FETCH from " : "",
! 						(*portal_name) ? portal_name : "<unnamed>",
  						portal->sourceText ? portal->sourceText : "")));
  
  	BeginCommand(portal->commandTag, dest);
--- 1720,1728 ----
  	if (log_statement == LOGSTMT_ALL)
  		/* We have the portal, so output the source query. */
  		ereport(LOG,
! 				(errmsg("statement: <protocol> %sEXECUTE %s  [PREPARE:  %s]",
  						execute_is_fetch ? "FETCH from " : "",
! 						*portal_name ? portal_name : "<unnamed>",
  						portal->sourceText ? portal->sourceText : "")));
  
  	BeginCommand(portal->commandTag, dest);
***************
*** 1826,1836 ****
  								secs, msecs)));
  			else
  				ereport(LOG,
! 						(errmsg("duration: %ld.%03d ms  statement: [protocol] %sEXECUTE %s  [PREPARE:  %s]",
  								secs, msecs,
  								execute_is_fetch ? "FETCH from " : "",
! 								(*portal_name) ? portal_name : "<unnamed>",
! 							portal->sourceText ? portal->sourceText : "")));
  		}
  	}
  
--- 1828,1838 ----
  								secs, msecs)));
  			else
  				ereport(LOG,
! 						(errmsg("duration: %ld.%03d ms  statement: <protocol> %sEXECUTE %s  [PREPARE:  %s]",
  								secs, msecs,
  								execute_is_fetch ? "FETCH from " : "",
! 								*portal_name ? portal_name : "<unnamed>",
! 								portal->sourceText ? portal->sourceText : "")));
  		}
  	}
  
