Re: log bind parameter values on error

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Alexey Bashtanov <bashtanov(at)imap(dot)cc>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: log bind parameter values on error
Date: 2019-12-04 14:37:15
Message-ID: 20191204143715.GA17312@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 2019-Dec-04, Alvaro Herrera wrote:

> > (Maybe do strnlen(maxlen), then count strnlen(1) starting at that point
> > -- so if that returns >=1, print the "..."?)
> So I found that I can make the code more reasonable with this simple
> coding,

With strndup.

Álvaro Herrera
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
v3-0001-Add-strndup-pg_strndup.patch text/x-diff 6.8 KB
v3-0002-Add-appendStringInfoStringQuoted.patch text/x-diff 5.4 KB
v3-0003-Restrict-length-printed-by-appendStringInfoString.patch text/x-diff 6.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-12-04 14:40:21 adding strndup
Previous Message Tom Lane 2019-12-04 14:14:07 Dumping/restoring fails on inherited generated column