From: | Daniel Farina <drfarina(at)gmail(dot)com> |
---|---|
To: | David Fetter <david(at)fetter(dot)org> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, Jeff Davis <pgsql(at)j-davis(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Hannu Krosing <hannu(at)krosing(dot)net>, Greg Smith <greg(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, 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-11-27 02:30:08 |
Message-ID: | 7b97c5a40911261830w5187cc49lfcfe93c30cbc9d4e@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Nov 26, 2009 at 6:13 PM, David Fetter <david(at)fetter(dot)org> wrote:
> It'd be nice to make this available to the next revision of DBI-Link
> and it'll be pretty handy for our SQL/MED whenever that happens.
Okay, so this thread sort of wandered into how we could refactor other
elements of COPY. Do we have a good sense on what we should do to the
current patch (or at least the idea represented by it) to get it into
a committable state within finite time?
I think adding a bytea and/or text mode is once such improvement...I
am still reluctant to give up on INTERNAL because the string buffer
passed in the INTERNAL scenario is ideal for C programmers -- the
interface is even simpler than dealing with varlena types. But I
agree that auxiliary modes should exist to enable easier hacking.
The thorniest issue in my mind is how state can be initialized
retained and/or modified between calls to the bytestream-acceptance
function.
Arguably it is already in a state where it is no worse than dblink,
which itself has a global hash table to manage state.
Also, if you look carefully at the dblink test suite I submitted,
you'll see an interesting trick: one can COPY from multiple sources
consecutively to a single COPY on a remote node when in text mode
(binary mode has a header that cannot be so neatly catenated). This
is something that's pretty hard to enable with any automatic
startup-work-cleanup approach.
fdr
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2009-11-27 04:16:52 | Re: patch - per-tablespace random_page_cost/seq_page_cost |
Previous Message | David Fetter | 2009-11-27 02:13:46 | Re: [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION |