Skip site navigation (1) Skip section navigation (2)

pgsql: Fix bugs in "restore.sql" script emitted in pg_dump tar output.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix bugs in "restore.sql" script emitted in pg_dump tar output.
Date: 2012-09-29 21:57:35
Message-ID: E1TI52V-0001GP-W1@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Fix bugs in "restore.sql" script emitted in pg_dump tar output.

The tar output module did some very ugly and ultimately incorrect hacking
on COPY commands to try to get them to work in the context of restoring a
deconstructed tar archive.  In particular, it would fail altogether for
table names containing any upper-case characters, since it smashed the
command string to lower-case before modifying it (and, just to add insult
to injury, did that in a way that would fail in multibyte encodings).
I don't see any particular value in being flexible about the case of the
command keywords, since the string will just have been created by
dumpTableData, so let's get rid of the whole case-folding thing.

Also, it doesn't seem to meet the POLA for the script to restore data only
in COPY mode, so add \i commands to make it have comparable behavior in
--inserts mode.

Noted while looking at the tar-output code in connection with Brian
Weaver's patch.

Branch
------
REL8_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/3dbd687488c3bd5fbb1d2c551d0a01cb20ec0b63

Modified Files
--------------
src/bin/pg_dump/pg_backup_tar.c |   84 +++++++++++++++++----------------------
1 files changed, 36 insertions(+), 48 deletions(-)

pgsql-committers by date

Next:From: Peter EisentrautDate: 2012-09-30 00:07:48
Subject: pgsql: Disable _FORTIFY_SOURCE with ICC
Previous:From: Peter EisentrautDate: 2012-09-29 17:24:13
Subject: pgsql: Add _FORTIFY_SOURCE to default compiler options for linuxtempla

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group