* Tom Lane:

> Florian Weimer <fwei...@bfk.de> writes:
>> The old 'escape' encoding used by PostgreSQL 8.4 and prior was pretty
>> helpful for getting human-readable strings in psql.  It seems this
>> functionality was removed in PostgreSQL 9.0.  Was this an accident or
>> a deliberate decision?  Could we get it back, please?
>
> I think you're looking for "set bytea_output = escape".

To me, this seems problematic as a general recommendation because
programs won't use this, and it's confusing to have different output
in psql than what your program sees.  That's why I don't want to put
it into .psqlrc.  The separate command will raise a few eyebrows here
and there. 8-/

Put differently, I think it's rather odd that in 9.0, both
encode(bytea_value, 'escape') and encode(bytea_value, 'hex') output
hexadecimal values.  There's also an explicit way to request such
output, so I don't think that encode() should obey the bytea_output
setting.  In 8.4's psql, a BYTEA column and its escape-encoded TEXT
were displayed differently, so there is precedent.

-- 
Florian Weimer                <fwei...@bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to