Re: [proposal] Add an option for returning SQLSTATE in psql error message

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: David Steele <david(at)pgmasters(dot)net>, didier <did447(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Pavel Stěhule <pavel(dot)stehule(at)gmail(dot)com>, andrew(at)tao11(dot)riddles(dot)org(dot)uk, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [proposal] Add an option for returning SQLSTATE in psql error message
Date: 2019-03-22 15:36:09
Message-ID: 2853.1553268969@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> But now that I read the patch again, I'm not sure why this needs to
> touch libpq. The formatting of error messages in psql should be handled
> in psql.

Maybe in an ideal world that'd be the case, but psql has always just
depended on PQerrorMessage(). I don't think this patch should be
tasked with changing that. I'm not even sure that doing so would be
a good idea: I think the idea there is that whatever we believe is a
nice error-reporting option for psql ought to be easily available to
other libpq clients too.

(Note: I haven't read the patch and don't mean to be saying that it's
necessarily OK. But I'm fine with the idea that something like this
involves touching libpq more than psql.)

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-03-22 15:38:59 Re: Ordered Partitioned Table Scans
Previous Message David Rowley 2019-03-22 15:35:09 Re: Ordered Partitioned Table Scans