Обсуждение: create user with database and contrib

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

create user with database and contrib

От
Michal Hlavac
Дата:
hello,

is there some simple way, how to do this???

I need to create user 'diplo' with no database create and no add users
privileges...

createuser -A -D -P -E -U root diplo

after that I create database 'diplo';

I need to import ltree into database 'diplo' with user diplo, but I
can't add grant access to language 'c', because only superusers can do
that...

thanks, miso

Re: create user with database and contrib

От
Oleg Bartunov
Дата:
On Sat, 9 Apr 2005, Michal Hlavac wrote:

> hello,
>
> is there some simple way, how to do this???
>
> I need to create user 'diplo' with no database create and no add users
> privileges...
>
> createuser -A -D -P -E -U root diplo
>
> after that I create database 'diplo';
>
> I need to import ltree into database 'diplo' with user diplo, but I
> can't add grant access to language 'c', because only superusers can do
> that...

so, what's the problem ?
psql diplo < ltree.sql


>
> thanks, miso
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

     Regards,
         Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

Re: create user with database and contrib

От
Michal Hlavac
Дата:
Oleg Bartunov wrote:
> so, what's the problem ? psql diplo < ltree.sql

ok, I can add ltree via superuser, but I must grant access for user
diplo to every function...

it is possible to do that easier?

Re: create user with database and contrib

От
Oleg Bartunov
Дата:
On Sat, 9 Apr 2005, Michal Hlavac wrote:

> Oleg Bartunov wrote:
>> so, what's the problem ? psql diplo < ltree.sql
>
> ok, I can add ltree via superuser, but I must grant access for user
> diplo to every function...
>
> it is possible to do that easier?

Did you try what I recommend you ? It should works

>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>

     Regards,
         Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

Re: create user with database and contrib

От
Bruno Wolff III
Дата:
On Sat, Apr 09, 2005 at 15:19:58 +0200,
  Michal Hlavac <hlavki@medium13.sk> wrote:
> Oleg Bartunov wrote:
> > so, what's the problem ? psql diplo < ltree.sql
>
> ok, I can add ltree via superuser, but I must grant access for user
> diplo to every function...
>
> it is possible to do that easier?

Functions are created with a grant of EXECUTE to public by default.

Re: create user with database and contrib

От
Tom Lane
Дата:
Oleg Bartunov <oleg@sai.msu.su> writes:
> On Sat, 9 Apr 2005, Michal Hlavac wrote:
>> ok, I can add ltree via superuser, but I must grant access for user
>> diplo to every function...

> Did you try what I recommend you ? It should works

Dunno about ltree, but I have found that the default installation of
tsearch2 is unusable by non-superusers because of lack of permissions.
I don't recall the details at the moment, but I think there are some
config tables that need to have permissions granted to PUBLIC.  It's
certainly not the functions, since those have PUBLIC EXECUTE by default.

If ltree has any components that aren't functions, it might need some
work of that kind too.

            regards, tom lane