Re: [HACKERS] Database-Role settings behaviour and docs mismatch

2010-02-05 Thread Bruce Momjian
Tom Lane wrote: > Simon Riggs 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 me

Re: [HACKERS] Database-Role settings behaviour and docs mismatch

2010-02-01 Thread Tom Lane
Simon Riggs 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 apply

Re: [HACKERS] Database-Role settings behaviour and docs mismatch

2010-02-01 Thread Simon Riggs
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 on ApplySetting to make it clear that it really means ApplySettingIfNotAlreadySet() -- Sim

Re: [HACKERS] Database-Role settings behaviour and docs mismatch

2010-02-01 Thread Alvaro Herrera
Simon Riggs wrote: > Whereas in process_settings() the sequence is this > > ApplySetting(databaseid, roleid, relsetting, PGC_S_DATABASE_USER); > ApplySetting(InvalidOid, roleid, relsetting, PGC_S_USER); > ApplySetting(databaseid, InvalidOid, relsetting, PGC_S_DATABASE); > > which looks to me lik

[HACKERS] Database-Role settings behaviour and docs mismatch

2010-02-01 Thread Simon Riggs
In the docs it says "It is also possible to tie a session default to a specific database rather than to a role; see ALTER DATABASE. If there is a conflict, database-role-specific settings override role-specific ones, which in turn override database-specific ones." Whereas in process_settings() th