Re: Schemas and template1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Schemas and template1
Date: 2002-06-12 03:42:28
Message-ID: 6288.1023853348@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> How about if we hard-wire template1 as being no-write to public
> somewhere in the code, rather than in the db tables?

Seems pretty icky :-(

It occurs to me that maybe we don't need to worry. The main reason why
we've offered the advice "don't fill template1 with junk" in the past
is that it was so hard to clear out the junk without zapping built-in
entries. But now, you really have to work hard at it to shoot yourself
in the foot that way. If you created junk in template1.public, no
sweat:
\c template1 postgres
DROP SCHEMA public;
CREATE SCHEMA public;
-- don't forget to set its permissions appropriately
(This assumes we get DROP SCHEMA implemented in time for 7.3, but
I think we can build that based on Rod's pg_depend stuff.) (Which
I really really gotta review and apply soon.)

I'm of the opinion that template1 and public are not very special
at the moment; the C-level code doesn't think either of them are
special, which is why you can drop and recreate them if you have to.
We should try not to re-introduce any low-level specialness.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-06-12 03:44:43 Re: Schemas and template1
Previous Message Tom Lane 2002-06-12 03:22:32 Re: Analyze on large changes...

Browse pgsql-interfaces by date

  From Date Subject
Next Message Bruce Momjian 2002-06-12 03:44:43 Re: Schemas and template1
Previous Message Bruce Momjian 2002-06-12 03:13:58 Re: Schemas and template1