Re: R: feature proposal ...

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hans-J?rgen Sch?nig <postgres(at)cybertec(dot)at>, Paolo Magnoli <pmagnoli(at)systemevolution(dot)it>, pgsql-hackers(at)postgresql(dot)org, eg(at)cybertec(dot)at
Subject: Re: R: feature proposal ...
Date: 2005-09-22 20:16:57
Message-ID: 43331139.2010800@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Jim C. Nasby wrote:

>While I'm all for COPY from views, I think I'd rather have the syntactic
>warts than code warts. ISTM that
>
>CREATE TEMP VIEW some_name AS SELECT * FROM table WHERE ...;
>COPY some_name TO stdout;
>
>is much uglier than
>
>COPY SELECT * FROM table WHERE ... TO stdout;
>
>

They aren't mutually exclusive, though. And once you have code in place
for the first part, turning the direct query case into a temp_view+copy
is arguably just a case of syntactic sugar. I do think the direct query
should at least be parenthesized, if we go that way.

So why not do what everyone is agreed on now? Whatever happens the work
won't be wasted.

Also, as nifty as this might be, we should also be prepared for people
to complain that it runs a lot slower than vanilla COPY, because it
surely will.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-09-22 20:25:53 Re: R: feature proposal ...
Previous Message Hannu Krosing 2005-09-22 20:08:59 Re: R: feature proposal ...