pg_dump : problem with grant on table columns

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

pg_dump : problem with grant on table columns

От:
Brice André <brice@famille-andre.be>
Дата:
Hello,

I sometimes define some access rights on table columns instead of whole table. Everything works fine except when I perform a dump.

When I dump a databse that contains such access rights, the pg_dump utility generates commands like this one :
GRANT SELECT("Login") ON TABLE "Clients" TO "AgendaSubscript";

But, when I execute the content of this dump in a fresh database (for backup and restore stuff), those commands are rejected and thus, my restored database has not the proper access rights.

Is this a bug with the pg_dump tool or am I doing something wrong ?

Regards,

Brice André

Re: pg_dump : problem with grant on table columns

От:
Craig Ringer <ringerc@ringerc.id.au>
Дата:


On Nov 15, 2011 9:46 PM, "Brice André" <brice@famille-andre.be> wrote:
>
> Hello,
>
> I sometimes define some access rights on table columns instead of whole table. Everything works fine except when I perform a dump.
>
> When I dump a databse that contains such access rights, the pg_dump utility generates commands like this one :
> GRANT SELECT("Login") ON TABLE "Clients" TO "AgendaSubscript";
>
> But, when I execute the content of this dump in a fresh database (for backup and restore stuff), those commands are rejected and thus, my restored database has not the proper access rights.

Please specify the version of Pg you are dumping from and the version you are restoring to.

At a guess you are restoring to a version from before column grants were added.

Please also give the full, exact text of any error message you get. See the guide to reporting problems on the wiki.

>
> Is this a bug with the pg_dump tool or am I doing something wrong ?
>
> Regards,
>
> Brice André

FAQ