Re: [HACKERS] psql command for bytea output

2011-10-21 Thread Pavel Stehule
2011/10/21 Andrew Dunstan andrew.duns...@pgexperts.com: A few months ago, I blogged about the difficulty of getting psql to put a bytea datum into a file. See http://people.planetpostgresql.org/andrew/index.php?/archives/196-Clever-trick-challenge.html. Today I ran into the problem again, and

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 Dunstanandrew.duns...@pgexperts.com: 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 andrew.duns...@pgexperts.com: On 10/21/2011 02:44 PM, Pavel Stehule wrote: 2011/10/21 Andrew Dunstanandrew.duns...@pgexperts.com: 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:51 PM, Pavel Stehule wrote: 2011/10/21 Andrew Dunstanandrew.duns...@pgexperts.com: On 10/21/2011 02:44 PM, Pavel Stehule wrote: 2011/10/21 Andrew Dunstanandrew.duns...@pgexperts.com: A few months ago, I blogged about the difficulty of getting psql to put a bytea datum into a

Re: [HACKERS] psql command for bytea output

2011-10-21 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: 2011/10/21 Andrew Dunstan andrew.duns...@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

Re: [HACKERS] psql command for bytea output

2011-10-21 Thread Pavel Stehule
2011/10/21 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: 2011/10/21 Andrew Dunstan andrew.duns...@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

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

Re: [HACKERS] psql command for bytea output

2011-10-21 Thread Tom Lane
Andrew Dunstan andrew.duns...@pgexperts.com 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