Re: PG_DIAG_SEVERITY and a possible bug in pq_parse_errornotice()

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jakob Egger <jakob(at)eggerapps(dot)at>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PG_DIAG_SEVERITY and a possible bug in pq_parse_errornotice()
Date: 2016-08-25 17:04:33
Message-ID: CA+Tgmoa8cbvmet4zBjVggbXkq8uZfHnqL2Nxtv_jTVMKiOwCig@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 25, 2016 at 11:43 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2016-08-25 17:05:28 Re: increasing the default WAL segment size
Previous Message Alvaro Herrera 2016-08-25 17:03:05 Re: WAL consistency check facility