Skip site navigation (1) Skip section navigation (2)

Database-Role settings behaviour and docs mismatch

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Database-Role settings behaviour and docs mismatch
Date: 2010-02-01 22:32:07
Message-ID: 1265063527.26250.4.camel@ebony (view raw or flat)
Thread:
Lists: pgsql-hackers
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() 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 like database-role specific settings are overridden by
both user and database specific ones, in contrast to how the docs
describe this.

Am I confused, or is this a problem?

Not that bothered, but seems like the docs provide more useful behaviour
and the code less useful.

-- 
 Simon Riggs           www.2ndQuadrant.com


Responses

pgsql-hackers by date

Next:From: James William PyeDate: 2010-02-01 22:35:38
Subject: Re: plpython3
Previous:From: Andrew DunstanDate: 2010-02-01 22:23:31
Subject: Re: remove contrib/xml2

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group