From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: COPY IN as SELECT target |
Date: | 2009-12-18 06:55:49 |
Message-ID: | 162867790912172255i74ffa4efk67c5d7626638cc46@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2009/12/17 Andrew Dunstan <andrew(at)dunslane(dot)net>:
>
> Recently there was discussion about allowing a COPY statement to be a SELECT
> target, returning a text array, although the syntax wasn't really nailed
> down that I recall. I was thinking that we might have
>
> COPY RETURNING ARRAY FROM ...
>
> instead of
>
> COPY tablename opt_column_list FROM ...
>
>
> the we possibly could do things like:
>
> SELECT t[5] as a, 3*(t[3]::numeric) as b FROM (COPY RETURNING ARRAY FROM
> STDIN CSV) as t;
>
> Thoughts?
In this case copy doesn't return array - so RETURNING ARRAY is little
bit strange.
what
SELECT .. FROM (COPY VALUES [(colums)] FROM ....)
Regards
Pavel
>
> cheers
>
> andrew
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
From | Date | Subject | |
---|---|---|---|
Next Message | Takahiro Itagaki | 2009-12-18 08:44:40 | Buffer statistics for pg_stat_statements |
Previous Message | Takahiro Itagaki | 2009-12-18 06:48:13 | Re: Largeobject Access Controls (r2460) |