Re: [HACKERS] Schemas and template1

2002-06-11 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> 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 o

Re: [HACKERS] Schemas and template1

2002-06-11 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> 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 te

Re: [HACKERS] Schemas and template1

2002-06-11 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> 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 essenti

Re: [HACKERS] Schemas and template1

2002-06-11 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> 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 newl

Re: [HACKERS] Schemas and template1

2002-06-11 Thread Bruce Momjian
Ron Snyder wrote: > > As part of createdb, the new database will have to have it's public > > schema changed to world-writable. > > I have to admit that much of the schema related discussion has been over my > head, but I think what I understand you to be saying here is that the > default would b

Re: [HACKERS] Schemas and template1

2002-06-11 Thread Ron Snyder
> As part of createdb, the new database will have to have it's public > schema changed to world-writable. I have to admit that much of the schema related discussion has been over my head, but I think what I understand you to be saying here is that the default would be to allow anybody to create t

[HACKERS] Schemas and template1

2002-06-11 Thread Bruce Momjian
There was discussion of how template1's "public" schema should behave. I think the only solution is to make template1's public schema writable only by the super-user. This way, we can allow utility commands to connect to template1, but they can't change anything or add their own tables. As part