[BUGS] BUG #8127: After failed insert a select to figure out what failed is rejected

2013-04-29 Thread matti . aarnio
The following bug has been logged on the website: Bug reference: 8127 Logged by: Matti Aarnio Email address: matti.aar...@methics.fi PostgreSQL version: 9.2.4 Operating system: Fedora 18 Description: With table: CREATE TABLE demo ( pkey INTEGER PRIMARY KEY

Re: [BUGS] BUG #7865: Unexpected error code on insert of duplicate to composite primary key

2013-02-11 Thread Matti Aarnio
On 02/11/2013 07:52 PM, Heikki Linnakangas wrote: > On 11.02.2013 17:34, Matti Aarnio wrote: >>} catch (SQLException e) { >>int code = e.getErrorCode(); >>if (code == 2 // Derby >> || code == 23505) {// PostgreSQL, Oracle, ... >

Re: [BUGS] BUG #7865: Unexpected error code on insert of duplicate to composite primary key

2013-02-11 Thread Matti Aarnio
On 02/11/2013 05:34 PM, Matti Aarnio wrote: > On 02/11/2013 02:11 PM, Heikki Linnakangas wrote: >> Works for me: >> >> postgres=# do $$ >> begin >> insert into example values ('2001-01-01', 'foo', 'bar'); >> insert into examp

Re: [BUGS] BUG #7865: Unexpected error code on insert of duplicate to composite primary key

2013-02-11 Thread Matti Aarnio
On 02/11/2013 02:11 PM, Heikki Linnakangas wrote: > Works for me: > > postgres=# do $$ > begin > insert into example values ('2001-01-01', 'foo', 'bar'); > insert into example values ('2001-01-01', 'foo', 'bar'); > exception > when others then raise notice 'caught %', sqlstate; > end; > $$; >

[BUGS] BUG #7865: Unexpected error code on insert of duplicate to composite primary key

2013-02-10 Thread matti . aarnio
The following bug has been logged on the website: Bug reference: 7865 Logged by: Matti Aarnio Email address: matti.aar...@methics.fi PostgreSQL version: 9.2.2 Operating system: Fedora Linux 17/18 Description: A table: CREATE TABLE example ( a TIMESTAMPNOT