Re: BUG #16868: Cannot find sqlstat error codes.

Поиск
Список
Период
Сортировка
От Euler Taveira
Тема Re: BUG #16868: Cannot find sqlstat error codes.
Дата
Msg-id e755ddf7-d6cb-4c60-9519-0ede6f78c36c@www.fastmail.com
обсуждение исходный текст
Ответ на Re: BUG #16868: Cannot find sqlstat error codes.  (bipsy Nair <nbipin29@gmail.com>)
Ответы Re: BUG #16868: Cannot find sqlstat error codes.  (bipsy Nair <nbipin29@gmail.com>)
Список 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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #16871: Insert with wrong key field, causing later crash of DB.
Следующее
От: "Euler Taveira"
Дата:
Сообщение: Re: PITR restores incorrect state