Re: log bind parameter values on error - Mailing list pgsql-hackers

From Alexey Bashtanov
Subject Re: log bind parameter values on error
Date
Msg-id e5196395-cf41-587c-331f-95bb38e3a11e@imap.cc
Whole thread Raw
In response to Re: log bind parameter values on error  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Hello Alvaro,

> I didn't like abusing testlibpq3.c for your new stuff, so I moved it off
> to a new file testlibpq5.c.  I cleaned up a few other cosmetics things
> about this -- v10 attached.
Thanks for doing this.

> I eventually noticed that this patch fails
> to initialize each param's textValue to NULL,
I've added the changes to set textValue to NULL for each parameter after 
calling makeParamList.
I think it's the best option, as it's natural to populate text 
representations (albeit with NULLs)
in the same loop as we write the other parameters attributes.

It still requires us to set hasTextValues afterwards, as it doesn't seem 
practical to me to make
two loops, first null them all and next populate them: if there's a 
parsing or converting problem
midway it's out of the feature scope and already being logged elsewhere.

Attaching v11, marking as waiting for review.

Best, Alex

Attachment

pgsql-hackers by date:

Previous
From: Anastasia Lubennikova
Date:
Subject: Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.
Next
From: David Steele
Date:
Subject: Re: Standby accepts recovery_target_timeline setting?