Re: psql command for bytea output - Mailing list pgsql-hackers

From Tom Lane
Subject Re: psql command for bytea output
Date
Msg-id 16174.1319228878@sss.pgh.pa.us
Whole thread Raw
In response to Re: psql command for bytea output  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: psql command for bytea output
List pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> 2011/10/21 Andrew Dunstan <andrew.dunstan@pgexperts.com>:
>> On 10/21/2011 02:44 PM, Pavel Stehule wrote:
>>> isn't better to fix current tools to work well with bytea?

>> Such as?

> some like
> \copy ... to foo.bin format binary

No, because COPY BINARY will emit its own sort of wrappers around the
data.

What I don't like about Andrew's proposal is that it seems rather
limited.  Why bytea in particular?  Text chunks could probably also use
a direct output method.  And what about input?

Could we do anything with a notion of a COPY RAW mode, that would dump
or read the data without any header, column, or row separators?  On
input I suppose you'd have to restrict it to one column --- on output,
we could leave re-dividing the data to the user's ingenuity ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: So, is COUNT(*) fast now?
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Log crashed backend's query v3