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

Per-database and per-user GUC settings

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Per-database and per-user GUC settings
Date: 2002-01-28 21:18:10
Message-ID: Pine.LNX.4.30.0201281607420.688-100000@peter.localdomain (view raw or flat)
Thread:
Lists: pgsql-hackers
As hinted somewhere within the schema-objects thread, I'm implementing GUC
settings that are stored in the pg_shadow and pg_database system catalogs
and are activated in sessions for that user or database.

The basic functionality is done, although two issues sort of need a show
of hands.  First, the order in which these settings are processed: I
figured user should be last.  I've also got these settings for each group,
but this would mean that if a user is a member of more than one group he
gets a rather random processing order.  Any comments on that?  If the
group thing stays, I think the most reasonable processing order is
database, groups, user, since it would be weird to have database between
groups and user.

Second, we need a few commands to set these things.  My first thought was

SET {USER name | DATABASE name} [SESSION] DEFAULT varname TO value;

but it would also make sense to have

ALTER {USER name | DATABASE name} SET DEFAULT varname TO value;

Or there could be other permutations that are more or less wordy.

Suggestions?  Perhaps a reference to another RDBMS can give a hint.

-- 
Peter Eisentraut   peter_e(at)gmx(dot)net


Responses

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2002-01-28 21:51:30
Subject: Rules for accessing tuple data in backend code
Previous:From: mlwDate: 2002-01-28 20:30:31
Subject: Re: sequence indexes

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