Per-database/schema settings

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Per-database/schema settings
Date: 2000-07-05 06:13:54
Message-ID: 3962D222.A7F62B59@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-07-05 06:14:04 Re: heap_create with OID?
Previous Message Constantin Teodorescu 2000-07-05 06:11:11 Re: Article on MySQL vs. Postgres