Re: COPY Transform support - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: COPY Transform support
Date
Msg-id 47F55160.402@dunslane.net
Whole thread Raw
In response to Re: COPY Transform support  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: COPY Transform support  (Decibel! <decibel@decibel.org>)
List pgsql-hackers

Tom Lane wrote:
> Gregory Stark <stark@enterprisedb.com> writes:
>   
>> AFAIK the state of the art is actually to load the data into a table which
>> closely matches the source material, sometimes just columns of text. Then copy
>> it all to another table doing transformations. Not impressed.
>>     
>
> I liked the idea of allowing COPY FROM to act as a table source in a
> larger SELECT or INSERT...SELECT.  Not at all sure what would be
> involved to implement that, but it seems a lot more flexible than
> any other approach.
>
>             
>   

Several years ago Bruce and I discussed the then theoretical use of a 
SELECT query as the source for COPY TO, and we agreed that the sane 
analog would be to have an INSERT query as the target of COPY FROM.

This idea seems to take that rather further. If doable I think it would 
be cool, as long as people don't try using it as an alternative storage 
engine. I can just imagine people creating views over such SELECT 
statements ...

cheers

andrew


pgsql-hackers by date:

Previous
From: Svenne Krap
Date:
Subject: Re: [GENERAL] SHA1 on postgres 8.3
Next
From: Tom Lane
Date:
Subject: Re: Row estimation for "var <> const" and for "NOT (...)" queries