From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Dimitri Fontaine <dfontaine(at)hi-media(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Andrew Dunstan <andrew(at)dunslane(dot)net>, "Decibel!" <decibel(at)decibel(dot)org>, Gregory Stark <stark(at)enterprisedb(dot)com> |
Subject: | Re: COPY Transform support |
Date: | 2008-04-08 14:14:09 |
Message-ID: | 635.1207664049@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Dimitri Fontaine <dfontaine(at)hi-media(dot)com> writes:
> Le mardi 08 avril 2008, Tom Lane a crit:
>> That's sufficiently covered by the proposal to allow a COPY FROM as a
>> table source within SELECT, no?
> Well, yes, the table source has text as datatypes and the select expression on
> the column will call whatever function/cast etc to do the work. But that
> opens the door to second class citizen storage solution for PostgreSQL, by
> letting the user CREATE VIEW atop of it:
[ shrug... ] I don't actually have a problem with that. If we did want
to prohibit that, we'd have to somehow prohibit SRFs from reading files,
because you can do it today with any untrusted PL.
I note also that presumably COPY FROM 'file' would still be restricted
to superusers, and only COPY FROM STDIN would be available to those
without a license to shoot themselves in the foot. So the opportunity
to do anything view-like would be restricted to adults(?) anyhow.
(One of the issues that'd have to be addressed to allow a table source
syntax is whether it's sane to allow multiple COPY FROM STDIN in a
single query. If so, how does it work; if not, how do we prevent it?)
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Gregory Stark | 2008-04-08 14:40:13 | Re: variables for tables and columns? |
Previous Message | tomas | 2008-04-08 14:07:54 | Re: File system snapshots for multiple file systems |