Re: COPY formatting

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: COPY formatting
Date: 2004-03-18 10:31:36
Message-ID: 20040318103136.GD19093@zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 18, 2004 at 09:29:03AM +0000, Lee Kindness wrote:
> To be honest this idea strikes me as overkill - over
> engineering.

It was suggestion, maybe you're right :-)

> While i have done a lot of messing around reading/writing the binary
> format (and been stung by changes in that format) if you are using
> this format then you're 99% likely to be in control of the
> incoming/outgoing data and thus able to format to your wishes outwith
> COPY.

I partly agree.

But.. there is possible write directly final file by backend without
data transfer to client. If we want to support this feature we need
control output format by server...

And.. I can image format that is use for BE/FE data transfer only and
not for some final data presentation. For example compression of data
stream from/to BE without PostgreSQL protocol change.

> Something else in the TODO regarding COPY is XML import/export, and
> for this to be supported in your proposed implementation the function
> would need to be passed in a heap more information.

Yes, very probably some struct with all COPY information and format
specific stuff. Tom was right that in this case it will C functions
only. As I said I will try implement it without user defined function
call for format conversion, but I will do it modular and in future we
can create some interface for user defined formats.

Karel

--
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
http://home.zf.jcu.cz/~zakkr/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Silvio Mazzaro 2004-03-18 14:11:15 Re: Problem on cluster initialization
Previous Message Francisco Reyes 2004-03-18 10:26:25 Inherited tables