Re: Schemas and template1

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Schemas and template1
Дата
Msg-id 6288.1023853348@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Schemas and template1  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Schemas and template1  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.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 postgresDROP 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Analyze on large changes...
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Schemas and template1