Re: Extensions not dumped when --schema is used

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Asif Rehman <asifr(dot)rehman(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Extensions not dumped when --schema is used
Date: 2021-02-03 17:42:11
Message-ID: CAECtzeWVwLwxT6f5Av3ChXxbEMRMKVepqkdSk7SPuOvjjPi5hw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Thanks for the review.

Le mer. 3 févr. 2021 à 18:33, Asif Rehman <asifr(dot)rehman(at)gmail(dot)com> a écrit :

> The following review has been posted through the commitfest application:
> make installcheck-world: tested, passed
> Implements feature: tested, passed
> Spec compliant: not tested
> Documentation: not tested
>
> The patch applies cleanly and looks fine to me. However consider this
> scenario.
>
> - CREATE SCHEMA foo;
> - CREATE EXTENSION file_fdw WITH SCHEMA foo;
> - pg_dump --file=/tmp/test.sql --exclude-schema=foo postgres
>
> This will still include the extension 'file_fdw' in the backup script.
> Shouldn't it be excluded as well?
>
> The new status of this patch is: Waiting on Author
>

This behaviour is already there without my patch, and I think it's a valid
behaviour. An extension doesn't belong to a schema. Its objects do, but the
extension doesn't.

--
Guillaume.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-02-03 17:53:12 Re: Removing support for COPY FROM STDIN in protocol version 2
Previous Message Asif Rehman 2021-02-03 17:32:19 Re: Extensions not dumped when --schema is used