Re: BUG #17526: PG_DUMP is not outputting "CREATE SCHEMA" statements when an extension is assigned to a schema
От | Tom Lane |
---|---|
Тема | Re: BUG #17526: PG_DUMP is not outputting "CREATE SCHEMA" statements when an extension is assigned to a schema |
Дата | |
Msg-id | 3344794.1655906512@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: BUG #17526: PG_DUMP is not outputting "CREATE SCHEMA" statements when an extension is assigned to a schema ("David G. Johnston" <david.g.johnston@gmail.com>) |
Список | pgsql-bugs |
"David G. Johnston" <david.g.johnston@gmail.com> writes: > Not a bug. Extension members are not dumped because the system expects > that a subsequent create extension command will create them. That is what > it means to be a member of the extension. Most users are not going to > execute the “alter extension add” command on there database as it doesn’t > really provide end-user useful functionality. Yeah. Correct use of this option would be to put the CREATE SCHEMA command in an extension upgrade script. (Notionally, you could also write "alter extension ... add schema ..." in that script, but the extension script execution mechanism takes care of that for you.) > Extension assigned to a schema is not the correct model here. “Given > control of the schema” or “Schema becomes an implementation detail of the > extension” are. If you want to put the extension's objects into a user-selected schema, you just create the schema and do "create extension ... with schema ...". It is not correct to then do "alter extension ... add schema", because in this approach the schema does not "belong to" the extension. regards, tom lane
В списке pgsql-bugs по дате отправления: