Re: Database-Role settings behaviour and docs mismatch
От | Bruce Momjian |
---|---|
Тема | Re: Database-Role settings behaviour and docs mismatch |
Дата | |
Msg-id | 201002052027.o15KR1s00511@momjian.us обсуждение исходный текст |
Ответ на | Re: Database-Role settings behaviour and docs mismatch (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Tom Lane wrote: > Simon Riggs <simon@2ndQuadrant.com> writes: > > On Mon, 2010-02-01 at 20:11 -0300, Alvaro Herrera wrote: > >> It'd probably be worth changing the order of the ApplySetting calls so > >> that it doesn't look suspicious. > > > Just a comment would be enough I think > > Yeah. Changing the order would mean that we'd do extra work applying > and then removing conflicting settings. But the general principle here > is that GUC settings coming from different places are resolved by > source priority, not order of execution. C comment patch attached and applied. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + Index: src/backend/utils/init/postinit.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v retrieving revision 1.201 diff -c -c -r1.201 postinit.c *** src/backend/utils/init/postinit.c 15 Jan 2010 09:19:04 -0000 1.201 --- src/backend/utils/init/postinit.c 5 Feb 2010 20:25:38 -0000 *************** *** 855,860 **** --- 855,861 ---- relsetting = heap_open(DbRoleSettingRelationId, AccessShareLock); + /* Later settings are ignored if set earlier. */ ApplySetting(databaseid, roleid, relsetting, PGC_S_DATABASE_USER); ApplySetting(InvalidOid, roleid, relsetting, PGC_S_USER); ApplySetting(databaseid, InvalidOid, relsetting, PGC_S_DATABASE);
В списке pgsql-hackers по дате отправления: