From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Viewing new 9.3 error fields |
Date: | 2013-04-11 18:08:47 |
Message-ID: | 20130411180847.GE6028@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
This blog entry displays the new 9.3 error fields, schema/table/constraint:
http://www.depesz.com/2013/03/07/waiting-for-9-3-provide-database-object-names-as-separate-fields-in-error-messages/
$ INSERT INTO t (i) VALUES (1);
psql:z.sql:16: ERROR: 23505: duplicate key value violates unique constraint "t2_pkey"
DETAIL: Key (i)=(1) already exists.
CONTEXT: SQL statement "INSERT INTO t2 (i) VALUES (NEW.i)"
PL/pgSQL function copy_value() line 4 at SQL statement
--> SCHEMA NAME: public
--> TABLE NAME: t2
--> CONSTRAINT NAME: t2_pkey
LOCATION: _bt_check_unique, nbtinsert.c:398
However, I am unable to see this in psql:
CREATE TABLE ledger (id SERIAL, balance NUMERIC(10,2) unique);
SET log_error_verbosity = 'verbose';
INSERT INTO ledger VALUES (DEFAULT, 1);
INSERT INTO ledger VALUES (DEFAULT, 1);
ERROR: duplicate key value violates unique constraint "ledger_balance_key"
DETAIL: Key (balance)=(1.00) already exists.
-->
What am I missing?
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
From | Date | Subject | |
---|---|---|---|
Next Message | Dickson S. Guedes | 2013-04-11 18:28:31 | Re: Viewing new 9.3 error fields |
Previous Message | Fujii Masao | 2013-04-11 17:35:08 | Re: Inconsistent DB data in Streaming Replication |