Re: [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION

Jeff Davis <pgsql@j-davis.com>

From: Jeff Davis <pgsql@j-davis.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Daniel Farina <drfarina@acm.org>, Greg Smith <greg@2ndquadrant.com>, Simon Riggs <simon@2ndquadrant.com>, Hannu Krosing <hannu@krosing.net>, Daniel Farina <dfarina@truviso.com>, pgsql-hackers@postgresql.org
Date: 2009-12-30T03:21:13Z
Lists: pgsql-hackers
On Tue, 2009-12-29 at 21:48 -0500, Robert Haas wrote:
> Anyway, my specific reaction to your suggestions in the email that I
> quoted is that it seems a bit baroque and that I'm not really sure
> what it's useful for in practice.  I'm certainly not saying it ISN'T
> useful, because I can't believe that you would have gone to the
> trouble to work through all of this unless you had some ideas about
> nifty things that could be done with it, but I think maybe we need to
> back up and start by talking about the problems you're trying to
> solve, before we get too far down into a discussion of implementation
> details.  It doesn't appear to me that's been discussed too much so
> far, although there's enough enthusiasm here to make me suspect that
> other people may understand it better than I do.

Dan made the use case fairly clear:

"I have extended COPY to support using a UDF as a target instead of the
normal 'file' or STDOUT targets.  This dovetails nicely with a couple
of extensions I have also written for dblink for the purposes of
enabling direct cross-node bulk loading and replication."
http://archives.postgresql.org/pgsql-hackers/2009-11/msg01555.php

David Fetter had some ideas as well:
http://archives.postgresql.org/pgsql-hackers/2009-11/msg01826.php

Regards,
	Jeff Davis