Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: [HACKERS] [PATCHES] log_statement output for protocol



On 8/29/06, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
        DETAIL:  prepare: SELECT $1;  bind: $1 = 'a''b'

I attached a trivial patch to add a dash between the prepare part and
the bind part. People usually don't finish their queries with a semi
colon so it's more readable with a separator.
DETAIL:  prepare: SELECT $1  bind: $1 = 'a''b'
becomes
DETAIL:  prepare: SELECT $1 - bind: $1 = 'a''b'

--
Guillaume
Index: src/backend/tcop/postgres.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/tcop/postgres.c,v
retrieving revision 1.501
diff -c -r1.501 postgres.c
*** src/backend/tcop/postgres.c	29 Aug 2006 02:32:41 -0000	1.501
--- src/backend/tcop/postgres.c	29 Aug 2006 11:46:15 -0000
***************
*** 1782,1788 ****
  						*portal_name ? portal_name : ""),
  						errdetail("prepare: %s%s%s", sourceText,
  						/* optionally print bind parameters */
! 						bindText ? "  bind: " : "",
  						bindText ? bindText : "")));
  
  	BeginCommand(portal->commandTag, dest);
--- 1782,1788 ----
  						*portal_name ? portal_name : ""),
  						errdetail("prepare: %s%s%s", sourceText,
  						/* optionally print bind parameters */
! 						bindText ? " - bind: " : "",
  						bindText ? bindText : "")));
  
  	BeginCommand(portal->commandTag, dest);
***************
*** 1896,1902 ****
  								*portal_name ? portal_name : ""),
  								errdetail("prepare: %s%s%s", sourceText,
  								/* optionally print bind parameters */
! 								bindText ? "  bind: " : "",
  								bindText ? bindText : "")));
  		}
  	}
--- 1896,1902 ----
  								*portal_name ? portal_name : ""),
  								errdetail("prepare: %s%s%s", sourceText,
  								/* optionally print bind parameters */
! 								bindText ? " - bind: " : "",
  								bindText ? bindText : "")));
  		}
  	}


Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group