Обсуждение: Question to schema public

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

Question to schema public

От
"Kai Behncke"
Дата:
Dear list,

If I create on my system (Postgresql 8.2.4) a new database it gets automatically the schema public.

I would like to know what this schema is for?

On my system I have a couple of different users.
The owner of the public-schema is postgres.

Could it be Fatal to give all of my users the maximum permissions to change that public schema? What could be the
result?

Thank you very much, Kai
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

Re: Question to schema public

От
Richard Huxton
Дата:
Kai Behncke wrote:
> Dear list,
>
> If I create on my system (Postgresql 8.2.4) a new database it gets
> automatically the schema public.
>
> I would like to know what this schema is for?
>
> On my system I have a couple of different users. The owner of the
> public-schema is postgres.

By default everyone gets access to objects in schema "public", so that's
select, update, insert, delete on any tables etc. It makes it easy to
get started.

> Could it be Fatal to give all of my users the maximum permissions to
> change that public schema? What could be the result?

Well, it depends on whether you want your users to be able to create and
drop tables,view,functions etc.

--
   Richard Huxton
   Archonet Ltd

Re: Question to schema public

От
"Albe Laurenz"
Дата:
Kai Behncke wrote:
> If I create on my system (Postgresql 8.2.4) a new database it
> gets automatically the schema public.
>
> I would like to know what this schema is for?

It is kind of a "default schema". If you keep the standard
configuration, then every user can access objects in this schema
without specifying a schema name.

If you don't need schema public, you can also delete it without
breaking anything.

> On my system I have a couple of different users.
> The owner of the public-schema is postgres.
>
> Could it be Fatal to give all of my users the maximum
> permissions to change that public schema? What could be the result?

That shouldn't be a problem. It means that
a) every user can create objects in this schema
b) every user can access objects in this schema
   (IF the object allows it)

Yours,
Laurenz Albe