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

From eisentrp@csis.gvsu.edu
Subject Re: Per-database/schema settings
Date
Msg-id Pine.LNX.4.21.0007050810070.10677-100000@eos05.csis.gvsu.edu
Whole thread Raw
In response to Per-database/schema settings  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
List pgsql-hackers
On Wed, 5 Jul 2000, Thomas Lockhart wrote:

> I've done a little work on enabling session-specific default behavior
> for transaction isolation level.

Is this the START TRANSACTION [ ISOLATION LEVEL ] command?

> 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,

What about something like ALTER DATABASE ... SET DEFAULT foo TO bar; The
ALTER SCHEMA command should be reserved to schema alerations.

> My initial thought was to add columns to pg_database for each setting,
> but this is not very extensible.

If it's an attribute of a database, then it should be a pg_database
column. Notice how the language I chose virtually forces you to do
that. :) And what's so non-extensible about that?

> I assume that Peter's recent "options" work does not apply, since it
> is not directly accessible though SQL.

The SHOW command continues to work like it always has. But most, if not
all, of these options are not really per-database material. They are
either debugging or developing aids that you turn on temporarily, or
choices that the site administrator does only once. These options really
don't have a lot to do with the SQL environment.

(Btw: http://www.postgresql.org/docs/admin/runtime-config.htm)

What kind of settings are you talking about, besides default character set
and date style? I would assume that the default charset is the one to be
used by the NCHAR type? About datestyle, I had thought that this setting
should really be deprecated, with the arrival of the to_char() family. If
you like a default datestyle, then you can define a view based on
to_char().


-- 
Peter Eisentraut                  Sernanders vaeg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: Proposed new libpq API
Next
From: Jakub Bartosz Bielecki
Date:
Subject: Re: Re: postgres - development of inet/cidr