From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: COPY FROM view |
Date: | 2006-05-28 20:13:50 |
Message-ID: | 20060528201350.GA16872@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, May 28, 2006 at 03:59:44PM -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> > I've been having the COPY FROM patch that was posted on
> > pgsql-patches some time ago (I think from Hannu Krossing), sitting
> > on my machine, with the intention to commit it for 8.2. However
> > there's something I'm not very sure about -- the patch creates an
> > execution plan by passing a literal "SELECT * FROM view" to
> > pg_parse_query, pg_analyze_and_rewrite, and finally planner().
>
> > I'm sure we can make this work appropiately, patching over the
> > quoting issues that the patch doesn't deal with, but I'm unsure if
> > this is an acceptable approach. (Actually I think it isn't.) But
> > what is an acceptable way to do it?
>
> It seems to me that we had decided that "COPY FROM VIEW" is not even
> the conceptually right way to think about the missing feature. It
> forces you to create a view (at least a temporary one) in order to
> do what you want. Furthermore it brings up the question of why
> can't you COPY TO VIEW. The correct way to think about it is to
> have a way of dumping the output of any arbitrary SELECT statement
> in COPY-like format.
>
> There was some previous discussion of exactly how to go about that;
> check the archives. Offhand I think we might have liked the syntax
> COPY (parenthesized-SELECT-statement) TO ...
+1 :)
Cheers,
D (who now goes with CREATE TEMP TABLE, COPY, DROP)
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter
Remember to vote!
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2006-05-28 21:25:45 | Re: LIKE, leading percent, bind parameters and indexes |
Previous Message | Eric Montague | 2006-05-28 20:08:09 | psql: krb5_sendauth: Bad application version was sent (via sendauth) - Windows 2000, MIT Kerberos, PG v 8.1.1 |