Обсуждение: SET SESSION AUTHORIZATION permissions

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

SET SESSION AUTHORIZATION permissions

От
Luís Sousa
Дата:
Hi all,

I'm using PostgreSQL 7.4.7-6sarge2 (debian).

Only superuser can issue the command SET SESSION AUTHORIZATION?
Suppose this, I have created all tables in one database with a
privileged user. On my ident config I putted that user so in interactive
session is so simple as \c - <privileged user> to connect with that user.
When I tried to dump and the restore on command line with my user, is
issued a SET SESSION AUTHORIZATION with a permission denied error!
Except running the script as superuser and giving superuser privileges
to my user, what can I do on command line so that SET SESSION
AUTHORIZATION doesn't fail?

Best regards,
Luís Sousa






Re: SET SESSION AUTHORIZATION permissions

От
Tom Lane
Дата:
=?ISO-8859-1?Q?Lu=EDs_Sousa?= <llsousa@ualg.pt> writes:
> Only superuser can issue the command SET SESSION AUTHORIZATION?

Well, yeah.

> When I tried to dump and the restore on command line with my user, is
> issued a SET SESSION AUTHORIZATION with a permission denied error!

Use --no-owner if you want to make pg_dump output that won't generate
this error (and want all the restored objects to be owned by whoever
runs the script).  Or just ignore the error messages.

            regards, tom lane