From: Euler Taveira <euler@eulerto.com>
To: pgsql-bugs@lists.postgresql.org
Cc: bipsy Nair <nbipin29@gmail.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Subject: Re: BUG #16868: Cannot find sqlstat error codes.
Date: Wed, 17 Feb 2021 13:54:03 -0300
Message-ID: <e755ddf7-d6cb-4c60-9519-0ede6f78c36c@www.fastmail.com> (raw)
In-Reply-To: <CAPu21XQs99-uJaPZ8N=PrzLAtCODm9+Ku0U+++xAFVxG4SJBtQ@mail.gmail.com>
References: <16868-5a3f2d3e054eb85c@postgresql.org>
<CAKFQuwa85p7rkRf7doY2dKmamzpOjdmcZ0J3Eojt+vLkwUVnag@mail.gmail.com>
<CAPu21XQs99-uJaPZ8N=PrzLAtCODm9+Ku0U+++xAFVxG4SJBtQ@mail.gmail.com>
On Tue, Feb 16, 2021, at 12:21 PM, bipsy Nair wrote:
> Here is the code with the required error and details. I tested this in all Postgres versions.
postgres=# \i /tmp/b16868.sql
DROP TABLE
CREATE TABLE
INSERT 0 1000
ALTER TABLE
psql:/tmp/b16868.sql:19: ERROR: duplicate key value violates unique constraint "pk_error_logging"
DETAIL: Key (id)=(1) already exists.
postgres=# \errverbose
ERROR: 23505: duplicate key value violates unique constraint "pk_error_logging"
DETAIL: Key (id)=(1) already exists.
SCHEMA NAME: public
TABLE NAME: bipin
CONSTRAINT NAME: pk_error_logging
LOCATION: _bt_check_unique, nbtinsert.c:656
The sqlstate (23505) is reported accordingly. Since you are using Aurora and it
is not Postgres, it should possibly omit the sqlstate in the error message stack.
The other possibility is that aurora-data-api is not gathering the sqlstate.
I'm afraid you won't find both answers here.
--
Euler Taveira
EDB https://www.enterprisedb.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: euler@eulerto.com, nbipin29@gmail.com, david.g.johnston@gmail.com
Subject: Re: BUG #16868: Cannot find sqlstat error codes.
In-Reply-To: <e755ddf7-d6cb-4c60-9519-0ede6f78c36c@www.fastmail.com>
References: <16868-5a3f2d3e054eb85c@postgresql.org> <CAKFQuwa85p7rkRf7doY2dKmamzpOjdmcZ0J3Eojt+vLkwUVnag@mail.gmail.com> <CAPu21XQs99-uJaPZ8N=PrzLAtCODm9+Ku0U+++xAFVxG4SJBtQ@mail.gmail.com> <e755ddf7-d6cb-4c60-9519-0ede6f78c36c@www.fastmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox