
> I like that a lot.  Solves the whole problem at a stroke, and even
> adds some extra functionality (alternate templates).
> 
> Do we need an actual enforcement mechanism for "don't modify 
> template0"?
> I think we could live without that for now.  If you're 
> worried about it,
> one way would be to not allow connections of any sort to template0...
> in fact template0 needn't be a real database at all, just a 
> $PGDATA/base
> subdirectory with no pg_database entry.

I like this "not really a database" idea.
Might even be something for $libdir, no ?
Then all that would be needed is a command that creates a
database from this location instead of template1.

Andreas

Thu, 9 Nov 2000 08:55:59 +0100 
Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>
AW: Unhappy thoughts about pg_dump and objects inherite
	d from template1
Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at> writes:
>> in fact template0 needn't be a real database at all, just a 
>> $PGDATA/base subdirectory with no pg_database entry.

> I like this "not really a database" idea.
> Might even be something for $libdir, no ?

I thought about that but concluded that it'd just be a way to shoot
ourselves in the foot.  The postmaster and backend per se don't know
where $PGLIB is (offhand, I think only the initdb and createlang
scripts do).  If we add a dependency on $PGLIB, I think we'll just
be setting up a new way to cause configuration mistakes --- and copying
the wrong template0 data would be a pretty messy sort of mistake.  So
keeping the template data under $PGDATA seems like the way to go.

However, template0 needn't necessarily be under $PGDATA/base, it could
be its own subdirectory of $PGDATA.  I'm not sure if that's a better
arrangement or not.

			regards, tom lane

Thu, 09 Nov 2000 10:19:53 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: AW: Unhappy thoughts about pg_dump and objects inherite d from
	template1