Re: [HACKERS] Patch for pg_dump (6.4) inheritance bug

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Patch for pg_dump (6.4) inheritance bug
Дата
Msg-id 19625.912896999@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Patch for pg_dump (6.4) inheritance bug  ("Oliver Elphick" <olly@lfix.co.uk>)
Список pgsql-hackers
"Oliver Elphick" <olly@lfix.co.uk> writes:
> It seems to work, at least for my database, so here is a patch:
> [ patch to prevent dumping of inherited constraints snipped ]

I have applied this patch to both the main CVS tree and REL6_4 branch,
along with Constantin Teodorescu's suggestion to improve the formatting
of pg_dump's CREATE TABLE commands, and some work of my own to stop
an occasional coredump in pg_dump -z.

FYI, I was able to simplify your query for fetching non-inherited
checks; it now looks like:

sprintf(query, "SELECT rcname, rcsrc from pg_relcheck "    "where rcrelid = '%s'::oid "    "   and not exists "    "
(select* from pg_relcheck as c, pg_inherits as i "    "   where i.inhrel = pg_relcheck.rcrelid "    "     and c.rcname
=pg_relcheck.rcname "    "     and c.rcsrc = pg_relcheck.rcsrc "    "     and c.rcrelid = i.inhparent) ",
tblinfo[i].oid);

        regards, tom lane


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

Предыдущее
От: "Oliver Elphick"
Дата:
Сообщение: Parser bug (?)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Parser bug (?)