Re: Schemas and template1

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: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Schemas and template1
Date: 2002-06-12 03:13:58
Message-ID: 200206120313.g5C3Dwx22438@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > As part of createdb, the new database will have to have it's public
> > schema changed to world-writable.
>
> That ain't gonna happen, unfortunately. CREATE DATABASE runs in some
> database other than the target one, so it's essentially impossible for
> the newly-created DB to contain any internal state that's different
> from the template DB. Next idea please?

Yes, there was an even bigger problem with my argument. If someone
wanted to make public no-write, and have all created databases inherit
from that, it wouldn't work because it would clear that on creation.

How about if we hard-wire template1 as being no-write to public
somewhere in the code, rather than in the db tables?

--
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 Tom Lane 2002-06-12 03:22:32 Re: Analyze on large changes...
Previous Message Bruce Momjian 2002-06-12 03:11:50 Re: Analyze on large changes...

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2002-06-12 03:42:28 Re: Schemas and template1
Previous Message Tom Lane 2002-06-12 02:57:57 Re: Schemas and template1