Re: psql command for bytea output

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Andrew Dunstan <andrew(dot)dunstan(at)pgexperts(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql command for bytea output
Date: 2011-10-21 18:44:27
Message-ID: CAFj8pRC2vSeD4-TK_zJnvG6YYTa2hSHDRsZAcXyOoQLSYjqtQg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2011/10/21 Andrew Dunstan <andrew(dot)dunstan(at)pgexperts(dot)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 it struck me that we could fairly
> easily have a new command to handle this, called, say, bcopy. So it would
> look like:
>
>   \bcopy (select generate_bytea()) to foo.bin
>
>
> Thoughts?

isn't better to fix current tools to work well with bytea?

Pavel

>
>
> cheers
>
> andrew
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2011-10-21 18:46:41 Re: psql command for bytea output
Previous Message Tom Lane 2011-10-21 18:33:31 Re: So, is COUNT(*) fast now?