Re: Filtering duplicated row with a trigger - Mailing list pgsql-novice

From Nabil Sayegh
Subject Re: Filtering duplicated row with a trigger
Date
Msg-id 3F819BB3.9060209@e-trolley.de
Whole thread Raw
In response to Filtering duplicated row with a trigger  (papapep <papapep@gmx.net>)
List 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 by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Filtering duplicated row with a trigger
Next
From: papapep
Date:
Subject: Re: [personal] Re: Filtering duplicated row with a trigger