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

From: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
To: Daniel Farina <dfarina(at)truviso(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Smith <greg(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(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-24 08:38:37
Message-ID: 1259051917.30357.60.camel@hvost1700
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2009-11-23 at 16:25 -0800, Daniel Farina wrote:
> On Mon, Nov 23, 2009 at 4:20 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > pgsql-hackers had some preliminary discussions a couple months back
> > on refactoring COPY to allow things like this --- see the thread
> > starting here:
> > http://archives.postgresql.org/pgsql-hackers/2009-09/msg00486.php
> > While I don't think we arrived at any final decisions, I would like
> > to know how this design fits in with what was discussed then.
>
> This seems to be about importing/ingress, whereas this patch is about
> exporting/egress...it is an interesting question on how much parsing
> to do before on the ingress side before handing a row to a function
> though,

My suggestion for

COPY func(rowtype) FROM stdin;

would be to pass the function a fully processed row of that type with
all fields resolved and converted to right types.

it may be useful to also have forms like

COPY func(text) FROM stdin;

and

COPY func(bytea[]) FROM stdin;

for getting a less processed input

> should we try to make these kinds of operations a bit more
> symmetrical.

--
Hannu Krosing http://www.2ndQuadrant.com
PostgreSQL Scalability and Availability
Services, Consulting and Training

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2009-11-24 08:47:46 Re: [HACKERS] Updating column on row update
Previous Message Itagaki Takahiro 2009-11-24 08:30:40 Re: Partitioning option for COPY