Bruce Momjian wrote:
> 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?
\set VERBOSITY verbose
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services