Database Reference
In-Depth Information
There's more...
postgresql.conf also supports an include directive. This allows the postgresql.conf file
to reference other files, which can then reference other files, and so on. That might help you
organise your parameter settings better, if you don't make it too complicated.
Setting parameters for particular groups
of users
PostgreSQL supports a variety of ways of defining parameter settings for various user groups.
How to do it...
For all users in database saas :
ALTER DATABASE saas
SET configuration_parameter = value1;
For a user named simon connected to any database, use the following:
ALTER ROLE saas
SET configuration_parameter = value2;
or set a parameter for a user only when connected to a specific database, as follows:
ALTER ROLE simon
IN DATABASE saas
SET configuration_parameter = value3;
The user won't know that these have been executed specifically for him. These are default
settings, and in most cases can be overridden if the user requires non-default values.
How it works...
You can set parameters for each of the following:
F Database
F User (named "Roles" by PostgreSQL)
F Database / User combination
Each of the parameter defaults is overridden by the one below it.
In the preceding three SQL statements if:
F user hannu connects to database saas, then value1 will apply
 
Search WWH ::




Custom Search