Re: [HACKERS] Schemas: status report, call for developers

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Schemas: status report, call for developers
Дата
Msg-id 2032.1020201393@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Schemas: status report, call for developers  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Schemas: status report, call for developers  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Re: [HACKERS] Schemas: status report, call for developers  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-interfaces
Bill Cunningham <billc@ballydev.com> 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


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

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: Schemas: status report, call for developers
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Schemas: status report, call for developers