Re: pg_dump gets attributes from tables in extensions

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump gets attributes from tables in extensions
Date: 2015-02-20 06:50:08
Message-ID: CAB7nPqTGeXi2v36F9hzDo1RP7aAdPi69_j66N_qxRJFXOQP2jQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 20, 2015 at 5:33 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On 2/16/15 2:45 AM, Michael Paquier wrote:
>> While looking at the patch to fix pg_dump with extensions containing
>> tables referencing each other, I got surprised by the fact that
>> getTableAttrs tries to dump table attributes even for tables that are
>> part of an extension. Is that normal?
>> Attached is a patch that I think makes things right, but not dumping any
>> tables that are part of ext_member.
>
> Can you provide an example/test case? (e.g., which publicly available
> extension contains tables with attributes?)

Sure. Attached is a simplified version of the extension I used for the
other patch on pg_dump.
$ psql -c 'create extension dump_test'
CREATE EXTENSION
$ psql -At -c '\dx+ dump_test'
table aa_tab_fkey
table bb_tab_fkey
$ pg_dump -v 2>&1 | grep "columns and types"
pg_dump: finding the columns and types of table "public"."bb_tab_fkey"
pg_dump: finding the columns and types of table "public"."aa_tab_fkey"
--
Michael

Attachment Content-Type Size
dump_test.tar.gz application/x-gzip 692 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2015-02-20 06:56:49 Re: Enforce creation of destination folders for source files in pg_regress (Was: pg_regress writes into source tree)
Previous Message Alfred Perlstein 2015-02-20 06:18:11 Question about durability and postgresql.