Re: Per-database/schema settings

From: eisentrp(at)csis(dot)gvsu(dot)edu
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Per-database/schema settings
Date: 2000-07-05 12:29:07
Message-ID: Pine.LNX.4.21.0007050810070.10677-100000@eos05.csis.gvsu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2000-07-05 12:42:09 Re: Proposed new libpq API
Previous Message Robert B. Easter 2000-07-05 12:27:07 Re: Article on MySQL vs. Postgres