Per-database/schema settings - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Per-database/schema settings
Date
Msg-id 3962D222.A7F62B59@alumni.caltech.edu
Whole thread Raw
Responses Re: Per-database/schema settings  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Per-database/schema settings  (eisentrp@csis.gvsu.edu)
List pgsql-hackers
I've done a little work on enabling session-specific default behavior
for transaction isolation level. I'm thinking about how to extend this
to default "database-specific" behaviors which persist between sessions
(such as "DateStyle", character encoding, etc), perhaps using the ALTER
SCHEMA command from SQL99. btw, this capability enables, overlaps or
impacts upcoming work to support general character encodings (which may
also be impacted by the current work on TOAST; we'll see).

Anyway, if these kinds of things can be set via SQL (they are required
to in SQL99) then istm that they could/should be stored in tables just
like everything else. My initial thought was to add columns to
pg_database for each setting, but this is not very extensible. Another
possibility might be to add routines somewhere as "trigger-able events"
which happen when, say, a row is selected from pg_database. I'll guess
that this in particular won't work, since pg_database is not opened from
within a fully functioning Postgres backend.

Any thoughts on how to go about this? I assume that Peter's recent
"options" work does not apply, since it is not directly accessible
though SQL. But I haven't looked to verify this assumption.
                   - Thomas


pgsql-hackers by date:

Previous
From: Philip Warner
Date:
Subject: Re: Re: [GENERAL] Revised Copyright: is this morepalatable?
Next
From: Constantin Teodorescu
Date:
Subject: Re: Article on MySQL vs. Postgres