Re: Bulkloading using COPY - ignore duplicates? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bulkloading using COPY - ignore duplicates?
Date
Msg-id 13185.1008687848@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bulkloading using COPY - ignore duplicates?  (Lee Kindness <lkindness@csl.co.uk>)
Responses Re: Bulkloading using COPY - ignore duplicates?  (Lee Kindness <lkindness@csl.co.uk>)
List pgsql-hackers
Lee Kindness <lkindness@csl.co.uk> writes:
> You're right - I was meaning 'SELECT DISTINCT ON ()'. However I'm only
> using it as an example of where the database is choosing (be it
> randomly) the data to discarded.

Not a good example to support your argument.  The entire point of
DISTINCT ON (imho) is that the rows that are kept or discarded are
*not* random, but can be selected by the user by specifying additional
sort columns.  DISTINCT ON would be pretty useless if it weren't for
that flexibility.  The corresponding concept in COPY will need to
provide flexible means for deciding which row to keep and which to
drop, else it'll be pretty useless.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Concerns about this release
Next
From: Tom Lane
Date:
Subject: Re: Connection Pooling, a year later