From: | Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com> |
---|---|
To: | Michael Banck <mbanck(at)gmx(dot)net> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Exclude schema during pg_restore |
Date: | 2016-08-31 10:59:22 |
Message-ID: | CAFcNs+pWkSzf8E709745+84VaSPMgWNDA9C0Y32RU+xam-94Yw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Em quarta-feira, 31 de agosto de 2016, Michael Banck <mbanck(at)gmx(dot)net>
escreveu:
> Hi,
>
> attached is a small patch that adds an -N option to pg_restore, in order
> to exclude a schema, in addition to -n for the restriction to a schema.
>
> In principle, this could be extended to -t etc., but I think having this
> for schemas would be the most useful with the least effort.
>
> One use case for this would be the need to restore one or more schemas
> first (using -n foo), then all the others (now using -N foo) without (i)
> having to specify them all with -n and (ii) getting errors due to
> already restored objects from the initial schema. While users could be
> told to just ignore the errors/warnings, it would be useful for
> automation when you would like to check for zero errors/warning, for
> example.
>
> I have so far seen two reasons for this use case: (i) Add-ons that are
> not yet an extension and install objects in public (e.g. ESRI ArcGIS),
> requiring the public schema to be present already on restore of user
> schemas and (ii) restoring materialized views that reference objects
> from other schemas; as permissions are restored last, no permissions
> have been granted for those other schemas yet.
>
> Argueably, those reasons could be dealt with as well, but this seems to
> be a generally useful addition to pg_restore, in my opinion.
>
>
Please add it to the next open commitfest.
Regards,
--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-08-31 11:26:22 | Re: Comment on GatherPath.single_copy |
Previous Message | Heikki Linnakangas | 2016-08-31 10:48:29 | Use static inline functions for Float <-> Datum conversions |