BUG #4054: Text containing ';' upsets db restores

Поиск
Список
Период
Сортировка
От Martin Gregorie
Тема BUG #4054: Text containing ';' upsets db restores
Дата
Msg-id 200803241945.m2OJjFvo001429@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #4054: Text containing ';' upsets db restores  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      4054
Logged by:          Martin Gregorie
Email address:      martin@gregorie.org
PostgreSQL version: 8.2.6
Operating system:   Linux (Redhat Fedora 8
Description:        Text containing ';' upsets db restores
Details:

I've been dumping my database using pg_dumpall in its default (fast)
version.

This weekend, after upgrading from Fedora 7 to Fedora 8 I had to restore my
database. Finger trouble & tiredness caused the restore. The database
survived the upgrade but not me. I found that replaying the output from
pg_dumpall into psql caused problems:

1) A VIEW in the database was not dropped. The DROP
   for it was not in the pg_dumpall file). Minor
   point, mentioned only for completeness.
   A manual DROP fixed that.

2) Every table has an int as the first field.
   This number value is flagged as an error for
   the first row in every table.

3) My tables have BYTEA and TEXT fields in them.
   In some rows these field contain HTML text.
   This caused syntax errors during the reload.
   Specifically, "; " and "</" sequences were
   interpreted by psql as syntactic errors wherever
   they occur in textual fields.

4) I was running psql with a -1 option which, rather
   to my surprise, didn't abort the run after the
   first error in the file. Lines that are not flagged
   with errors seem to have loaded OK

The pg_dumpall that made the dumps was from the fully patched version of
Fedora 7 (Postgresql 8.2.5?). The restore was made using psql from version
8.2.6.

The errors were captured in the log file, which is safe from being
overwritten. You're welcome to either the whole thing or to edited
highlights from it.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Aleksej Saushev"
Дата:
Сообщение: BUG #4053: libpq documentation should express clearly, that integers are passed in network octet order
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #4054: Text containing ';' upsets db restores