Thread: pg_dump : problem with grant on table columns

pg_dump : problem with grant on table columns

From
Brice André
Date:
Hello,<br /><br />I sometimes define some access rights on table columns instead of whole table. Everything works fine
exceptwhen I perform a dump.<br /><br />When I dump a databse that contains such access rights, the pg_dump utility
generatescommands like this one : <br /> GRANT SELECT("Login") ON TABLE "Clients" TO "AgendaSubscript";<br /><br />But,
whenI execute the content of this dump in a fresh database (for backup and restore stuff), those commands are rejected
andthus, my restored database has not the proper access rights.<br /><br />Is this a bug with the pg_dump tool or am I
doingsomething wrong ?<br /><br />Regards,<br /><br />Brice André<br /> 

Re: pg_dump : problem with grant on table columns

From
Craig Ringer
Date:
<p><br /> On Nov 15, 2011 9:46 PM, "Brice André" <<a
href="mailto:brice@famille-andre.be">brice@famille-andre.be</a>>wrote:<br /> ><br /> > Hello,<br /> ><br />
>I sometimes define some access rights on table columns instead of whole table. Everything works fine except when I
performa dump.<br /> ><br /> > When I dump a databse that contains such access rights, the pg_dump utility
generatescommands like this one : <br /> > GRANT SELECT("Login") ON TABLE "Clients" TO "AgendaSubscript";<br />
><br/> > But, when I execute the content of this dump in a fresh database (for backup and restore stuff), those
commandsare rejected and thus, my restored database has not the proper access rights.<br /><p>Please specify the
versionof Pg you are dumping from and the version you are restoring to. <p>At a guess you are restoring to a version
frombefore column grants were added.<p>Please also give the full, exact text of any error message you get. See the
guideto reporting problems on the wiki.<p>><br /> > Is this a bug with the pg_dump tool or am I doing something
wrong?<br /> ><br /> > Regards,<br /> ><br /> > Brice André<br />