Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id EBF0E475864; Tue, 30 Apr 2002 17:16:34 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 667FB475461; Tue, 30 Apr 2002 17:16:33 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g3ULGXF02035; Tue, 30 Apr 2002 17:16:33 -0400 (EDT) To: Bill Cunningham Cc: pgsql-hackers , pgsql-interfaces Subject: Re: Schemas: status report, call for developers In-reply-to: <3CCF02AA.2000209@ballydev.com> References: <21020.1020187890@sss.pgh.pa.us> <3CCED849.5040400@ballydev.com> <21260.1020191025@sss.pgh.pa.us> <3CCF02AA.2000209@ballydev.com> Comments: In-reply-to Bill Cunningham message dated "Tue, 30 Apr 2002 13:46:34 -0700" Date: Tue, 30 Apr 2002 17:16:33 -0400 Message-ID: <2032.1020201393@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200204/1534 X-Sequence-Number: 22198 Bill Cunningham writes: > So we now have a default schema name of the current user? > ... This is exactly how DB2 operates, implict schemas for each user. You can operate that way. It's not the default though; the DBA will have to explicitly do a CREATE SCHEMA for each user. For instance: test=# CREATE USER tgl; CREATE USER test=# CREATE SCHEMA tgl AUTHORIZATION tgl; CREATE test=# \c - tgl You are now connected as new user tgl. test=> select current_schemas(); current_schemas ----------------- {tgl,public} -- my search path is now tgl, public (1 row) -- this creates tgl.foo: test=> create table foo(f1 int); CREATE test=> select * from foo; f1 ---- (0 rows) test=> select * from tgl.foo; f1 ---- (0 rows) If you don't create schemas then you get backwards-compatible behavior (all the users end up sharing the "public" schema as their current schema). See the development-docs pages I mentioned before for details. regards, tom lane