From: Tom Lane <tgl@sss.pgh.pa.us>
To: Julian Mehnle <julian@mehnle.net>
Cc: pgsql-bugs@postgresql.org
Subject: Re: pg_restore silently chokes on object comments/descriptions ending in a backslash
Date: Tue, 26 Jul 2011 23:27:14 -0400
Message-ID: <23791.1311737234@sss.pgh.pa.us> (raw)
In-Reply-To: <201107270042.22427.julian@mehnle.net>
References: <201107270042.22427.julian@mehnle.net>
Julian Mehnle <julian@mehnle.net> writes:
> If the comment/description of a database object (table, function, etc.)
> ends in a backslash (which generally works fine otherwise), then
> pg_restore is unable to completely restore a custom-format dump of the
> schema.
Reproduced here against HEAD. The problem seems to be that
pg_backup_db.c's _sendSQLLine() contains a mini SQL lexer that is not
cognizant of standard_conforming_strings. Not sure about a simple fix,
and I rather wonder if we shouldn't try to remove that code entirely
instead of "fix" it.
As a temporary workaround, the SQL text file that pg_restore produces
by default seems to be valid, so you could pipe that into psql.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, julian@mehnle.net
Subject: Re: pg_restore silently chokes on object comments/descriptions ending in a backslash
In-Reply-To: <23791.1311737234@sss.pgh.pa.us>
References: <201107270042.22427.julian@mehnle.net> <23791.1311737234@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox