matti.aar...@methics.fi writes: > CREATE TABLE example ( > a TIMESTAMP NOT NULL, > b VARCHAR(256) NOT NULL, > c VARCHAR(256) NOT NULL, > PRIMARY KEY(a,b,c) > );
> Inserting a duplicate record on this is returning an SQL Error, but the > status code is 0 instead of expected 23505. Works for me: regression=# CREATE TABLE example ( regression(# a TIMESTAMP NOT NULL, regression(# b VARCHAR(256) NOT NULL, regression(# c VARCHAR(256) NOT NULL, regression(# PRIMARY KEY(a,b,c) regression(# ); CREATE TABLE regression=# \set VERBOSITY verbose regression=# insert into example values('today','today','foo'); INSERT 0 1 regression=# insert into example values('today','today','foo'); ERROR: 23505: duplicate key value violates unique constraint "example_pkey" DETAIL: Key (a, b, c)=(2013-02-10 00:00:00, today, foo) already exists. SCHEMA NAME: public TABLE NAME: example CONSTRAINT NAME: example_pkey LOCATION: _bt_check_unique, nbtinsert.c:398 I'm guessing you have a client-side problem, but since you've said nothing about what the client-side software is, it's hard to venture anything more detailed. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs