Re: log bind parameter values on error
Alexey Bashtanov <bashtanov@imap.cc>
From: Alexey Bashtanov <bashtanov@imap.cc>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
Andres Freund <andres@anarazel.de>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2019-09-27T16:45:23Z
Lists: pgsql-hackers
Attachments
- log_parameters_v011.patch (text/x-patch) patch v11
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
Commits
-
Emit parameter values during query bind/execute errors
- ba79cb5dc841 13.0 landed
-
Add backend-only appendStringInfoStringQuoted
- 6cafde1bd43f 13.0 landed