Re: [HACKERS] psql command for bytea output

2011-10-21 Thread Tom Lane
Andrew Dunstan writes: > I also think this is really just a psql issue. Most other clients (e.g. > a perl DBD::Pg client) will have no trouble handling all this now. Well, that's debatable, and in any case I think you'd find it will be easier to push this into COPY than to invent new psql backsl

Re: [HACKERS] psql command for bytea output

2011-10-21 Thread Andrew Dunstan
On 10/21/2011 04:43 PM, Pavel Stehule wrote: 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 woul

Re: [HACKERS] psql command for bytea output

2011-10-21 Thread Pavel Stehule
2011/10/21 Tom Lane : > Pavel Stehule writes: >> 2011/10/21 Andrew Dunstan : >>> 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 it

Re: [HACKERS] psql command for bytea output

2011-10-21 Thread Tom Lane
Pavel Stehule writes: > 2011/10/21 Andrew Dunstan : >> 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 d

Re: [HACKERS] psql command for bytea output

2011-10-21 Thread Andrew Dunstan
On 10/21/2011 02:51 PM, Pavel Stehule wrote: 2011/10/21 Andrew Dunstan: On 10/21/2011 02:44 PM, Pavel Stehule wrote: 2011/10/21 Andrew Dunstan: A few months ago, I blogged about the difficulty of getting psql to put a bytea datum into a file. See

Re: [HACKERS] psql command for bytea output

2011-10-21 Thread Pavel Stehule
2011/10/21 Andrew Dunstan : > On 10/21/2011 02:44 PM, Pavel Stehule wrote: >> >> 2011/10/21 Andrew Dunstan: >>> >>> A few months ago, I blogged about the difficulty of getting psql to put a >>> bytea datum into a file. See >>> >>>

Re: [HACKERS] psql command for bytea output

2011-10-21 Thread Andrew Dunstan
On 10/21/2011 02:44 PM, Pavel Stehule wrote: 2011/10/21 Andrew Dunstan: A few months ago, I blogged about the difficulty of getting psql to put a bytea datum into a file. See . Today I ran into the pro

Re: [HACKERS] psql command for bytea output

2011-10-21 Thread Pavel Stehule
2011/10/21 Andrew Dunstan : > > A few months ago, I blogged about the difficulty of getting psql to put a > bytea datum into a file. See > . > Today I ran into the problem again, and it struck me that we