psql command for bytea output

From: Andrew Dunstan <andrew(dot)dunstan(at)pgexperts(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: psql command for bytea output
Date: 2011-10-21 18:21:47
Message-ID: 4EA1B83B.2050605@pgexperts.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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?

cheers

andrew

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-10-21 18:30:17 Re: Synchronized snapshots versus multiple databases
Previous Message Robert Haas 2011-10-21 18:14:12 Re: So, is COUNT(*) fast now?