Re: TODO item: Allow more complex user/database default GUC settings
От | Alvaro Herrera |
---|---|
Тема | Re: TODO item: Allow more complex user/database default GUC settings |
Дата | |
Msg-id | 20090930155025.GD8280@alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: TODO item: Allow more complex user/database default GUC settings (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Tom Lane escribió: > Alvaro Herrera <alvherre@commandprompt.com> writes: > > And here's the last necessary bit, which is pg_dump support for all > > this. > > > + /* Dump role/database settings */ > > + if (!tablespaces_only) > > + { > > + if (server_version >= 80500) > > + dumpDbRoleConfig(conn); > > + } > > Hmm ... I would kind of think that --roles-only should suppress this too. > Otherwise you're going to be dumping commands that might refer to > nonexistent databases. Those double negatives are confusing as hell. I propose to add something like this: do_tablespaces = true; do_databases = true; do_roles = true; if (globals_only) do_databases = false; if(tablespaces_only) { do_roles = false; do_databases = false; } if (roles_only) { do_databases= false; do_tablespaces = false; } Then we can have the new block this way: /* Dump role/database settings */ if (do_databases && do_roles) { if (server_version >= 80500) dumpDbRoleConfig(conn); } -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
В списке pgsql-hackers по дате отправления: