pgsql: Refactor one conversion of SQLSTATE to string in elog.c

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Refactor one conversion of SQLSTATE to string in elog.c
Date: 2021-09-01 02:49:13
Message-ID: E1mLGJN-0007mG-1c@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Refactor one conversion of SQLSTATE to string in elog.c

unpack_sql_state() has been introduced in d46bc44 to refactor the
unpacking of a SQLSTATE into a string, but it forgot one code path when
sending error reports to clients that could make use of it. This
changes the code to also use unpack_sql_state() there, simplifying a bit
the code.

Author: Peter Smith
Discussion: https://postgr.es/m/CAHut+PuYituuD1-VVZUNcmCQuc3ZzZMPoO57POgm8tnXOkwJAA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c4f7a6b87ff350200f4b3afb9fe05e2899161070

Modified Files
--------------
src/backend/utils/error/elog.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2021-09-01 03:39:08 pgsql: VACUUM VERBOSE: Don't report "pages removed".
Previous Message Michael Paquier 2021-09-01 01:29:03 pgsql: Add PostgresNode::command_fails_like()