Re: [GENERAL] please help me recover from duplicate key in unique index - Mailing list pgsql-general

From Bruce Momjian
Subject Re: [GENERAL] please help me recover from duplicate key in unique index
Date
Msg-id 200001050022.TAA01087@candle.pha.pa.us
Whole thread Raw
In response to Re: [GENERAL] please help me recover from duplicate key in unique index  (Jim Mercer <jim@reptiles.org>)
List pgsql-general
> On Tue, Jan 04, 2000 at 06:47:39PM -0500, Bruce Momjian wrote:
> > Try:
> >
> > SELECT oid, *
> > FROM table
> > GROUP BY oid
> > HAVING count(*) > 1
> >
> > that should show your duplicates, and you can remove them using
> > table.oid = _bad_number_.
>
> ah, i thought each row had a unique oid, and thus, that query wouldn't show the
> duplicate content.
>

Oh, I thought they were using oid's for keys.  I see now.  Yes, you are
correct.


--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-general by date:

Previous
From: Jim Mercer
Date:
Subject: Re: [GENERAL] please help me recover from duplicate key in unique index
Next
From: Ed Loehr
Date:
Subject: Re: [GENERAL] please help me recover from duplicate key in unique index