Обсуждение: SCHEMA's

Поиск
Список
Период
Сортировка

SCHEMA's

От
"Hepworth, Mike"
Дата:
Need some help with schema's.

I want to be able make a user have a default schema other than public.

I want to be able to have several schema's with the same group of tables
define in each one.

(Example)
schema a (users 1,2,3)table atable btable c
schema b (users 4,5,6)table atable btable c
schema c (users 7,8,9)table atable btable c

When a user logs into the database they will go to there default schema and
not the public schema.

(Example)
User 5 logs in and by default uses a, b, c tables under schema b.

Any ideas?

Thanks,

Mike Hepworth.....


Re: SCHEMA's

От
Tom Lane
Дата:
"Hepworth, Mike" <mike.hepworth@pbs.proquest.com> writes:
> I want to be able make a user have a default schema other than public.

If the schema name is the same as the user name then this happens
automatically.

Otherwise, you want to set a search_path value for the user --- see
ALTER USER and read up on the search_path runtime parameter.
        regards, tom lane