Re: [INTERFACES] Deleting duplicate records

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [INTERFACES] Deleting duplicate records
Дата
Msg-id 24023.944589714@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Deleting duplicate records  ("Paul S. Ganney" <paul.ganney@dial.pipex.com>)
Список pgsql-interfaces
"Paul S. Ganney" <paul.ganney@dial.pipex.com> writes:
> I've managed to get some duplicate records in a table and am having 
> problems getting rid of them (as there's nothing unique to SELECT on). 
> Any ideas?

There's always the OID.  Doselect oid,* from table ...
to see it, and get rid of the unwanted rows withdelete from table where oid = nnnn;

> And whilst I'm at it - any ideas on a scheme for preventing duplicates?

Unique index on whatever combination of fields is your primary key?
        regards, tom lane


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [INTERFACES] locking on database updates
Следующее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: [INTERFACES] locking on database updates