From: | "Euler Taveira" <euler(at)eulerto(dot)com> |
---|---|
To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Cc: | "bipsy Nair" <nbipin29(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Subject: | Re: BUG #16868: Cannot find sqlstat error codes. |
Date: | 2021-02-17 16:54:03 |
Message-ID: | e755ddf7-d6cb-4c60-9519-0ede6f78c36c@www.fastmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
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/
From | Date | Subject | |
---|---|---|---|
Next Message | Euler Taveira | 2021-02-17 17:06:00 | Re: PITR restores incorrect state |
Previous Message | Tom Lane | 2021-02-17 16:02:04 | Re: BUG #16871: Insert with wrong key field, causing later crash of DB. |