Re: COPY IN as SELECT target - Mailing list pgsql-hackers

From Tom Lane
Subject Re: COPY IN as SELECT target
Date
Msg-id 4183.1261071765@sss.pgh.pa.us
Whole thread Raw
In response to Re: COPY IN as SELECT target  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: COPY IN as SELECT target  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> Andrew Dunstan wrote:
>> COPY RETURNING ARRAY FROM ...

> It's not really returning an array, is it? It's returning a bag of rows
> like a (sub)query.

> How about just COPY FROM?

The problem with COPY FROM is that it hard-wires a decision that there
is one and only one possible result format, which I think we pretty
much proved already is the wrong thing.  I'm not thrilled with "RETURNING
ARRAY" either, but we need to leave ourselves wiggle room to have more
than one result format from the same source file.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: COPY IN as SELECT target
Next
From: Greg Stark
Date:
Subject: Re: determine snapshot after obtaining locks for first statement