Re: Bug in pg_dump
От | Stephen Frost |
---|---|
Тема | Re: Bug in pg_dump |
Дата | |
Msg-id | 20150301212722.GH29780@tamriel.snowman.net обсуждение исходный текст |
Ответ на | Re: Bug in pg_dump (Stephen Frost <sfrost@snowman.net>) |
Ответы |
Re: Bug in pg_dump
|
Список | pgsql-hackers |
Michael, * Stephen Frost (sfrost@snowman.net) wrote: > * Michael Paquier (michael.paquier@gmail.com) wrote: > > The thing is that we must absolutely wait for *all* the TableInfoData > > of all the extensions to be created because we need to mark the > > dependencies between them, and even my last patch, or even with what > > you are proposing we may miss tracking of FK dependencies between > > tables in different extensions. This has little chance to happen in > > practice, but I think that we should definitely get things right. > > Hence something like this query able to query all the FK dependencies > > with tables in extensions is more useful, and it has no IN clause: > > Ah, yes, extensions can depend on each other and so this could > definitely happen. The current issue is around postgis, which by itself > provides three different extensions. > > > + appendPQExpBuffer(query, > > + "SELECT conrelid, confrelid " > > + "FROM pg_constraint " > > + "LEFT JOIN pg_depend ON (objid = confrelid) " > > + "WHERE contype = 'f' " > > + "AND refclassid = 'pg_extension'::regclass " > > + "AND classid = 'pg_class'::regclass;"); > > I'm trying to figure out why this is a left join..? Please see the latest version of this, attached. I've removed the left join, re-used the 'query' buffer (instead of destroying and recreating it), and added a bit of documentation, along with a note in the commit message for the release notes. Would be great if you could review it and let me know. As mentioned in my other email, I'm happy to include the TAP test in master once we've worked out the correct way to handle installing the extension for testing in the Makefile system. Thanks! Stephen
Вложения
В списке pgsql-hackers по дате отправления: