Re: Schemas and template1 - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Schemas and template1
Date
Msg-id 200206120313.g5C3Dwx22438@candle.pha.pa.us
Whole thread Raw
In response to Re: Schemas and template1  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Schemas and template1  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.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@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Analyze on large changes...
Next
From: Tom Lane
Date:
Subject: Re: Analyze on large changes...