Search Postgresql Archives

Re: PQendcopy:resetting connection Problem and Cannot insert a duplicate key into unique index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 3, 2010 at 2:16 PM, Wang, Mary Y <mary.y.wang@xxxxxxxxxx> wrote:
> Thanks Tom.
> I still couldn't find that particular line that caused that problem :-(.  Counting was very pain.
> Is there anyway that I can tell psql just to "ignore" (I mean don't insert it duplicate key into unique index users_pkey) and just keep going without doing the PQendcopy:resetting connection?

Not really directly.  What I'd do is remove the unique constraint,
insert, then use something like

select max(row_id) from table t1 join table t2 on
t1.somefield=t2.somefield and t1.row_id<>r2.row_id;

to find dupes and remove them.

Then I'd dump the whole db and migrate to a more modern version of pgsql.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux