[GENERAL] Strange primary key error on insertion

2011-10-06 Thread Rory Campbell-Lange
I have a strange issue (postgres 8.4) trying to insert old rows back into the s_tbls table. A check on the primary key (n_id) between s_tbl_import and s_tbls yields no matches, yet the index on s_tbls.n_id yields an error when attempting to insert: = select n_id from s_tbl_import where n_id IN (

Re: [GENERAL] Strange primary key error on insertion

2011-10-06 Thread Filip RembiaƂkowski
2011/10/6 Rory Campbell-Lange r...@campbell-lange.net I have a strange issue (postgres 8.4) trying to insert old rows back into the s_tbls table. A check on the primary key (n_id) between s_tbl_import and s_tbls yields no matches, yet the index on s_tbls.n_id yields an error when attempting

Re: [GENERAL] Strange primary key error on insertion

2011-10-06 Thread Rory Campbell-Lange
On 06/10/11, Filip RembiaƂkowski (plk.zu...@gmail.com) wrote: 2011/10/6 Rory Campbell-Lange r...@campbell-lange.net = insert into s_tbls (select * from s_tbl_import); ERROR: duplicate key value violates unique constraint s_tbls_pkey Looks like you had duplicates in s_tbl_import.