Re: COPY Transform support

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: "Decibel!" <decibel(at)decibel(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gregory Stark <stark(at)enterprisedb(dot)com>, Dimitri Fontaine <dfontaine(at)hi-media(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: COPY Transform support
Date: 2008-04-07 19:04:26
Message-ID: 47FA703A.5040808@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Decibel! wrote:
> On Apr 3, 2008, at 4:51 PM, Andrew Dunstan wrote:
>> 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 ...
>
>
> Why not? There's certainly cases where doing just that could be very
> valuable. Storing older information that you're less likely to query
> comes to mind... in those cases you're going to be seqscanning anyway,
> so being able to read off a compact on-disk form is likely to be a win
> performance-wise. It could certainly be a win storage-wise.
>
> If someone wants to look at syntax options, I'm pretty certain that
> Oracle supports this. IIRC you actually create what appears to the
> database to be a real table, except for restrictions on what you can
> actually do with it (for example, IIRC it's read-only).
>

You're serious aren't you?

Quite apart from any other reason why not, this would be a horrid hack
and is just the sort of "feature" we rightly eschew, IMNSHO. COPY is
designed as a bulk load/unload facility. It's fragile enough in that role.

If we really want to support an alternative storage engine then we
should tackle that front on and not via a back door like this.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2008-04-07 19:09:22 Re: File system snapshots for multiple file systems
Previous Message Jonah H. Harris 2008-04-07 19:03:41 Re: File system snapshots for multiple file systems