From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | Daniel Farina <drfarina(at)acm(dot)org>, Greg Smith <greg(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Hannu Krosing <hannu(at)krosing(dot)net>, Daniel Farina <dfarina(at)truviso(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION |
Date: | 2009-12-30 05:00:34 |
Message-ID: | 603c8f070912292100i7b99bdddj46a59c96bca9e4b0@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Dec 29, 2009 at 11:44 PM, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> On Tue, 2009-12-29 at 23:11 -0500, Robert Haas wrote:
>> I fear that to make this really useful we would need to define some
>> new SQL syntax, like:
>>
>> CREATE [OR REPLACE] COPY TARGET name (STARTUP function_name, STREAM
>> function_name, SHUTDOWN function_name);
>> DROP COPY TARGET name;
>> GRANT USAGE ON COPY TARGET TO ...;
>>
>> COPY ... TO/FROM TARGET name (generic_option_list) WITH (options);
>
> Similar ideas were already suggested:
>
> http://archives.postgresql.org/pgsql-hackers/2009-11/msg01601.php
> http://archives.postgresql.org/pgsql-hackers/2009-11/msg01610.php
Sorry, it's been a while since I've read through this thread and I am
not as up on it as perhaps I should be. I generally agree with those
ideas, although I think that trying to make the existing aggregate
interface serve this purpose will probably turn out to be trying to
make a square peg fit a round hole.
> Regardless, I think there needs to be a way to pass arguments to the
> functions (at least the startup one). The obvious use case is to pass
> the destination table name, so that you don't have to define a separate
> target for each destination table.
Agreed, note that I suggested a way to do that.
...Robert
From | Date | Subject | |
---|---|---|---|
Next Message | Hiroshi Saito | 2009-12-30 05:07:37 | Re: test/example does not support win32. |
Previous Message | Tom Lane | 2009-12-30 04:57:50 | Re: test/example does not support win32. |