From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Lee Kindness <lkindness(at)csl(dot)co(dot)uk> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: 7.4 COPY BINARY Format Change |
Date: | 2003-08-04 13:44:01 |
Message-ID: | 24988.1060004641@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Lee Kindness <lkindness(at)csl(dot)co(dot)uk> writes:
> However, is COPY BINARY meant/designed to be used as transfer or
> backup mechanism?
I think you're overlooking a key consideration: COPY BINARY is not
an isolated feature anymore. By design it uses the same data
representations as are used for binary query parameters and results
in the rest of the 7.4 FE/BE protocol.
I could see some value in providing byte-swapping routines in libpq
to convert between local and network representations for integers and
floats. The underlying facilities (ntohl etc) are readily available,
of course, but it's a small matter that is easy to get wrong.
I'm not sure it's worth packaging up COPY BINARY logic per se. I think
you'd end up with an API not materially simpler than dealing with the
format directly. And I'm unconvinced it'd actually be used widely,
whereas I do expect binary transfer of individual values to be common.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-08-04 13:46:30 | Re: DROP TYPE/DROP DOMAIN |
Previous Message | Julian Satchell | 2003-08-04 13:43:58 | lower and upper not UTF-8 safe |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-08-04 13:49:41 | Re: [HACKERS] statement level trigger causes pltcl, plpython SIGSEGV |
Previous Message | Lee Kindness | 2003-08-04 10:25:36 | Re: 7.4 COPY BINARY Format Change |