Re: Filtering duplicated row with a trigger

Поиск
Список
Период
Сортировка
От Nabil Sayegh
Тема Re: Filtering duplicated row with a trigger
Дата
Msg-id 3F819BB3.9060209@e-trolley.de
обсуждение исходный текст
Ответ на Filtering duplicated row with a trigger  (papapep <papapep@gmx.net>)
Список pgsql-novice
papapep wrote:
> Anyone can give me some guide to how the function should do the control
> of duplicated rows?

First tell us what the function should do.
If you just want to ignore the 'duplicate' rows, that's easy:

define 1 column as unique and just insert (without transaction) the data
row by row.
Every 'duplicate' row will throw an error, but since we don't use a
transaction here the row is 'ignored', leaving only rows that are
distinct for that unique column.

I write 'duplicate' in quotes, because you didn't define what you mean
by duplicate.

HTH
--
  e-Trolley Sayegh & John, Nabil Sayegh
  Tel.: 0700 etrolley /// 0700 38765539
  Fax.: +49 69 8299381-8
  PGP : http://www.e-trolley.de


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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Filtering duplicated row with a trigger
Следующее
От: papapep
Дата:
Сообщение: Re: [personal] Re: Filtering duplicated row with a trigger