Re: If a schema is created as part of an extension, should all user created tables created in that schema be considered part of the extension?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: If a schema is created as part of an extension, should all user created tables created in that schema be considered part of the extension?
Дата
Msg-id 2872.1459001783@sss.pgh.pa.us
обсуждение исходный текст
Ответ на If a schema is created as part of an extension, should all user created tables created in that schema be considered part of the extension?  ("Regina Obe" <lr@pcorp.us>)
Ответы Re: If a schema is created as part of an extension, should all user created tables created in that schema be considered part of the extension?  ("Regina Obe" <lr@pcorp.us>)
Список pgsql-hackers
"Regina Obe" <lr@pcorp.us> writes:
> I just discovered something which was a little alarming to me.
> In the postgis_tiger_geocoder extension, I had switched to having the schema
> where user data download is stored created as part of create extension
> script so I wouldn't need to check during load.
> ...
> When I recently did a full database backup (not excluding tiger_data), I
> discovered that none of the tables were in the backup file.

I think the chain of events is that the tiger_data schema is marked as
not to be backed up (because it belongs to an extension) and then all
of its tables are marked as not to be backed up because they're in a
schema that's not to be backed up.  The latter behavior is meant to
implement --exclude-schema but it's firing on this case too.  I think
it might've behaved differently before c42df2d46.

The whole idea of non-extension objects in a schema owned by an extension
seems pretty grotty to me though; that would mean that dropping the
extension forces dropping those objects, which I wouldn't think you want.
So I'm not sure it's worth complicating matters to make this case behave
differently in pg_dump.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Can we amend gitignore so git postgresql works with git on windows using Msys/Mingw64
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Alter or rename enum value