]> granicus.if.org Git - postgresql/commit
Fix pg_restore to do the right thing when escaping large objects.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 21 Jan 2011 21:22:21 +0000 (16:22 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 21 Jan 2011 21:22:21 +0000 (16:22 -0500)
commit2a1ef1011548e329f4eca86671401bf4124f9d1e
tree58798b0c936832b4e70edb88fd0cb175560f5464
parent9de3f2843c4cf695a37d04d268df350b6118a232
Fix pg_restore to do the right thing when escaping large objects.

Specifically, this makes the workflow pg_dump -Fc -> pg_restore -> file
produce correct output for BLOBs when the source database has
standard_conforming_strings turned on.  It was already okay when that was
off, or if pg_restore was told to restore directly into a database.

This is a back-port of commit b1732111f233bbb72788e92a627242ec28a85631 of
2009-08-04, with additional changes to emit old-style escaped bytea data
instead of hex-style.  At the time, we had not heard of anyone encountering
the problem in the field, so I judged it not worth the risk of changing
back branches.  Now we do have a report, from Bosco Rama, so back-patch
into 8.2 through 8.4.  9.0 and up are okay already.
src/bin/pg_dump/dumputils.c
src/bin/pg_dump/dumputils.h
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_backup_archiver.h
src/bin/pg_dump/pg_backup_null.c