Re: pg_dump gets attributes from tables in extensions
От | Rushabh Lathia |
---|---|
Тема | Re: pg_dump gets attributes from tables in extensions |
Дата | |
Msg-id | CAGPqQf1_XRFfeS6gFDR8dv4N2quar72G5hnAt0ozfFW8gCLoTw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: pg_dump gets attributes from tables in extensions (Michael Paquier <michael.paquier@gmail.com>) |
Ответы |
Re: pg_dump gets attributes from tables in extensions
|
Список | pgsql-hackers |
<div dir="ltr">Thanks to the easy handy testcase, was able to replicate the test scenario<br />on my local environment. Andyes tbinfo->dobj.ext_member check into<br />getTableAttrs() do fix the issue.<br /><br />Looking more into pg_dumpcode what I found that, generally PG don't have <br />tbinfo->dobj.ext_member check to ignore the object. Mostlywe do this kind<br />of check using tbinfo->dobj.dump (look at dumpTable() for reference). Do you<br />have anyparticular reason if choosing dobj.ext_member over dobj.dump ?<br /></div><div class="gmail_extra"><br /><div class="gmail_quote">OnFri, Feb 20, 2015 at 12:20 PM, Michael Paquier <span dir="ltr"><<a href="mailto:michael.paquier@gmail.com"target="_blank">michael.paquier@gmail.com</a>></span> wrote:<br /><blockquote class="gmail_quote"style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, Feb 20, 2015at 5:33 AM, Peter Eisentraut <<a href="mailto:peter_e@gmx.net">peter_e@gmx.net</a>> wrote:<br /> > On 2/16/152:45 AM, Michael Paquier wrote:<br /> >> While looking at the patch to fix pg_dump with extensions containing<br/> >> tables referencing each other, I got surprised by the fact that<br /> >> getTableAttrs triesto dump table attributes even for tables that are<br /> >> part of an extension. Is that normal?<br /> >>Attached is a patch that I think makes things right, but not dumping any<br /> >> tables that are part of ext_member.<br/> ><br /> > Can you provide an example/test case? (e.g., which publicly available<br /> > extensioncontains tables with attributes?)<br /><br /></span>Sure. Attached is a simplified version of the extension I usedfor the<br /> other patch on pg_dump.<br /> $ psql -c 'create extension dump_test'<br /> CREATE EXTENSION<br /> $ psql-At -c '\dx+ dump_test'<br /> table aa_tab_fkey<br /> table bb_tab_fkey<br /> $ pg_dump -v 2>&1 | grep "columnsand types"<br /> pg_dump: finding the columns and types of table "public"."bb_tab_fkey"<br /> pg_dump: finding thecolumns and types of table "public"."aa_tab_fkey"<br /><span class="HOEnZb"><font color="#888888">--<br /> Michael<br/></font></span><br /><br /> --<br /> Sent via pgsql-hackers mailing list (<a href="mailto:pgsql-hackers@postgresql.org">pgsql-hackers@postgresql.org</a>)<br/> To make changes to your subscription:<br/><a href="http://www.postgresql.org/mailpref/pgsql-hackers" target="_blank">http://www.postgresql.org/mailpref/pgsql-hackers</a><br/><br /></blockquote></div><br /><br clear="all" /><br/>-- <br /><div class="gmail_signature">Rushabh Lathia</div></div>
В списке pgsql-hackers по дате отправления: