Re: PG_DIAG_SEVERITY and a possible bug in pq_parse_errornotice() - Mailing list pgsql-hackers

From Robert Haas
Subject Re: PG_DIAG_SEVERITY and a possible bug in pq_parse_errornotice()
Date
Msg-id CA+Tgmoa8cbvmet4zBjVggbXkq8uZfHnqL2Nxtv_jTVMKiOwCig@mail.gmail.com
Whole thread Raw
In response to Re: PG_DIAG_SEVERITY and a possible bug in pq_parse_errornotice()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PG_DIAG_SEVERITY and a possible bug in pq_parse_errornotice()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Aug 25, 2016 at 11:43 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Ooops.  Indeed, that is broken:
>
> postgres=# select 1/0;  -- using French locale
> ERREUR:  division par zéro
> postgres=# set force_parallel_mode=1;
> SET
> postgres=# select stringu1::int2 from tenk1 where unique1 = 1;
> ERREUR:  unknown error severity
> CONTEXT:  parallel worker
>
> Not sure what we ought to do about that, but we need to do something.

Uggh.  Obviously, I failed to realize that those strings were
localized.  Leaving aside the question of this particular matching
problem, I wonder if we are localizing everything twice right now,
once in the worker and once in the leader.  It's probably best to try
to hack things somehow so that the worker localizes nothing and the
leader localizes everything.  Or we could add another field to the
message the worker sends that includes the error level as an integer.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: WAL consistency check facility
Next
From: Magnus Hagander
Date:
Subject: Re: increasing the default WAL segment size