Re: RFD: schemas and different kinds of Postgres objects

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Zeugswetter Andreas SB SD <ZeugswetterA(at)spardat(dot)at>, Fernando Nasser <fnasser(at)redhat(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: RFD: schemas and different kinds of Postgres objects
Date: 2002-01-25 03:26:43
Message-ID: 200201250326.g0P3Qhw23061@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > Or are you thinking about a per session behavior ?
> > I would rather envision a per database behavior.
> > Maybe the easy way out would be a "default creation schema" property for
> > each user, that would default to the username. If you want everything in one
> > schema simply alter the users.
>
> I hadn't really gotten to the point of thinking about exactly what and
> where the control knobs should be. I suspect you are right that we will
> want the default behavior to be selectable on a per-user or per-database
> basis, which seems to eliminate the option of using GUC (at least in its
> current form). We could easily add a field to pg_shadow or pg_database
> respectively to determine the default behavior. It'd be nice though if
> the behavior could be changed after connection by a SET statement, which
> would be lots easier if the setting were GUC-controlled. Peter, you see
> any way to resolve that?

I think we could set the database default at db creation time, then
allow SET to modify that default per session; seems flexible enough.
It is basically a GUC value who's default is stored in pg_database
rather than postgresql.conf. You could use postgresql.conf to set the
default schema type at db creation time.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2002-01-25 04:00:57 Re: RFD: schemas and different kinds of Postgres objects
Previous Message Bruce Momjian 2002-01-25 03:23:22 Re: RFD: schemas and different kinds of Postgres objects