pgsql: Support hex-string input and output for type BYTEA.

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Support hex-string input and output for type BYTEA.
Date: 2009-08-04 16:08:37
Message-ID: 20090804160837.2156975331E@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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

Modified Files:
--------------
pgsql/doc/src/sgml:
config.sgml (r1.222 -> r1.223)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/config.sgml?r1=1.222&r2=1.223)
datatype.sgml (r1.240 -> r1.241)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/datatype.sgml?r1=1.240&r2=1.241)
pgsql/src/backend/catalog:
pg_largeobject.c (r1.32 -> r1.33)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/pg_largeobject.c?r1=1.32&r2=1.33)
pgsql/src/backend/commands:
trigger.c (r1.251 -> r1.252)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/trigger.c?r1=1.251&r2=1.252)
pgsql/src/backend/optimizer/path:
indxpath.c (r1.240 -> r1.241)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/indxpath.c?r1=1.240&r2=1.241)
pgsql/src/backend/utils/adt:
encode.c (r1.23 -> r1.24)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/encode.c?r1=1.23&r2=1.24)
selfuncs.c (r1.261 -> r1.262)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/selfuncs.c?r1=1.261&r2=1.262)
varlena.c (r1.171 -> r1.172)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/varlena.c?r1=1.171&r2=1.172)
pgsql/src/backend/utils/misc:
guc.c (r1.509 -> r1.510)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/guc.c?r1=1.509&r2=1.510)
postgresql.conf.sample (r1.262 -> r1.263)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/postgresql.conf.sample?r1=1.262&r2=1.263)
pgsql/src/bin/pg_dump:
pg_dump.c (r1.544 -> r1.545)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_dump.c?r1=1.544&r2=1.545)
pgsql/src/include/utils:
builtins.h (r1.337 -> r1.338)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/builtins.h?r1=1.337&r2=1.338)
pgsql/src/interfaces/libpq:
fe-exec.c (r1.203 -> r1.204)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/libpq/fe-exec.c?r1=1.203&r2=1.204)
pgsql/src/test/regress/expected:
conversion.out (r1.14 -> r1.15)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/conversion.out?r1=1.14&r2=1.15)
strings.out (r1.38 -> r1.39)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/strings.out?r1=1.38&r2=1.39)
pgsql/src/test/regress/input:
largeobject.source (r1.5 -> r1.6)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/input/largeobject.source?r1=1.5&r2=1.6)
pgsql/src/test/regress/output:
largeobject.source (r1.5 -> r1.6)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/output/largeobject.source?r1=1.5&r2=1.6)
largeobject_1.source (r1.2 -> r1.3)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/output/largeobject_1.source?r1=1.2&r2=1.3)
pgsql/src/test/regress/sql:
conversion.sql (r1.11 -> r1.12)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/conversion.sql?r1=1.11&r2=1.12)
strings.sql (r1.26 -> r1.27)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/strings.sql?r1=1.26&r2=1.27)

Added Files:
-----------
pgsql/src/include/utils:
bytea.h (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/bytea.h?rev=1.1&content-type=text/x-cvsweb-markup)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2009-08-04 18:05:42 pgsql: Teach PQescapeByteaConn() to use hex format when the target
Previous Message Tom Lane 2009-08-04 15:37:02 Re: Re: [COMMITTERS] pgsql: Cause pg_proc.probin to be declared as text, not bytea.