At 10:56 8/11/00 -0500, Tom Lane wrote:
>Philip Warner <pjw@rhyme.com.au> writes:
>> Just seems like we'd be forcing non-standard syntax on ourselves when/if
>> CREATE DATABASE becomes CREATE SCHEMA; I would assume that the two
>> statements would become synonymous?
>
>No, I don't think so --- we already have WITH LOCATION and WITH
>ENCODING, neither of which look like schema-level properties to me.
CREATE SCHEMA supports character set specification, so I'd guess 'WITH
ENCODING' will apply in some form. It also support a 'schema path name',
which may or may not map to locations.
>> Question: if I issue a "CREATE DATABASE foo WITH TEMPLATE 'my-favorite-db'"
>> will I just get a copy of the specified database, including data?
>
>If we allow it, that's what would happen. Seems like a potential
>security hole though ... should we restrict the set of clonable
>templates somehow?
It would be nice to have a 'supported' COPY DATABASE (which is what we're
talking about, really), so I'd vote for being able to use any DB as a
template, if possible.
Can we restrict the command to databases that have only one active backend?
Or add an 'istemplate' flag set in pg_database? I don't really like relying
on specific name formats, if we can avoid it.
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 0500 83 82 82 | ___________ |
Http://www.rhyme.com.au | / \| | --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/