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

From Tom Lane
Subject Re: COPY IN as SELECT target
Date
Msg-id 5461.1261075855@sss.pgh.pa.us
Whole thread Raw
In response to Re: COPY IN as SELECT target  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: COPY IN as SELECT target
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> You might want to specify column names as well as well as types, in
> this second case.

Well, we could do it like VALUES: arbitrarily name the columns column1
... columnN and tell people to use an alias if they want other names.
If it's convenient to fit column names into the syntax, good, but we
don't absolutely have to.

[ thinks... ] Although actually the obvious SQL-ish syntax for a rowtype
specification is
( colname typename [ , ... ] )

so that's probably what we'd want to do in the processed-data case.
Not sure about the raw-data case --- maybe a predetermined name is
okay there.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: determine snapshot after obtaining locks for first statement
Next
From: Tom Lane
Date:
Subject: Re: determine snapshot after obtaining locks for first statement