Support hex-string input and output for type BYTEA.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 4 Aug 2009 16:08:37 +0000 (16:08 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 4 Aug 2009 16:08:37 +0000 (16:08 +0000)
commit99c597aa45500cfe8f8e43f4126d60e6898301d9
treec1bb24609c6651c6f519e1faeab110148202f93b
parentf964177099f239a406c2030ed3005c665eaa8462
Support hex-string input and output for type BYTEA.

Both hex format and the traditional "escape" format are automatically
handled on input.  The output format is selected by the new GUC variable
bytea_output.

As committed, bytea_output defaults to HEX, which is an *incompatible
change*.  We will keep it this way for awhile for testing purposes, but
should consider whether to switch to the more backwards-compatible
default of ESCAPE before 8.5 is released.

Peter Eisentraut
21 files changed:
doc/src/sgml/config.sgml
doc/src/sgml/datatype.sgml
src/backend/catalog/pg_largeobject.c
src/backend/commands/trigger.c
src/backend/optimizer/path/indxpath.c
src/backend/utils/adt/encode.c
src/backend/utils/adt/selfuncs.c
src/backend/utils/adt/varlena.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/bin/pg_dump/pg_dump.c
src/include/utils/builtins.h
src/include/utils/bytea.h [new file with mode: 0644]
src/interfaces/libpq/fe-exec.c
src/test/regress/expected/conversion.out
src/test/regress/expected/strings.out
src/test/regress/input/largeobject.source
src/test/regress/output/largeobject.source
src/test/regress/output/largeobject_1.source
src/test/regress/sql/conversion.sql
src/test/regress/sql/strings.sql