PG V9.6 / REVOKE SELECT columns ON TABLE T1 FROM John
DECHERF Étienne <[email protected]> Fri, 19 Oct 2018 16:20:35 +0000
| Newsgroups | gmane.comp.db.postgresql.french |
|---|---|
| Message-ID | <35B45AE5854FD442A1775EB1337F9701C8C50C@BBS-EXCMBX-P005.wprod.ds.aphp.fr> |
--_000_35B45AE5854FD442A1775EB1337F9701C8C50CBBSEXCMBXP005wpro_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, I 've created a PostgreSQL user "John" with REVOKE SELECT columns from him. but "REVOKE SELECT (ipp , nom_nais , nom , prenom) ON TABLE table1 FROM "Jo= hn";" command doesn't work in my script above : Here is how I created the user "John": CREATE ROLE "john"; REVOKE ALL PRIVILEGES ON DATABASE pgdb FROM "john"; ALTER ROLE "john" WITH LOGIN; ALTER ROLE "john" WITH PASSWORD 'password' VALID UNTIL '2018-12-31'; GRANT CONNECT ON DATABASE dbpg TO "john"; GRANT USAGE ON SCHEMA schema1 TO "john"; ----- forbid access to 4 columns of Table1 REVOKE SELECT (ipp , nom_nais , nom , prenom) ON TABLE Table1 FROM "John"; Result : The 4 columns are still displayed. The "REVOKE SELECT column" doen't work. I manage always to select values in= the 4 columns. Can you see why John can still watch the 4 columns ? Is a comand missing in this script ? Database version is 9.6. Thanks a lot for your help ! Etienne DECHERF DBA [email protected] +33 6 67462246 --_000_35B45AE5854FD442A1775EB1337F9701C8C50CBBSEXCMBXP005wpro_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <html dir=3D"ltr"> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-= 1"> <style type=3D"text/css" id=3D"owaParaStyle">=0A= <!--=0A= p=0A= {margin-top:0;=0A= margin-bottom:0}=0A= -->=0A= P {margin-top:0;margin-bottom:0;}</style> </head> <body fpstyle=3D"1" ocsi=3D"0"> <div style=3D"direction: ltr;font-family: Tahoma;color: #000000;font-size: = 10pt;">Hello,<br> <br> I 've created a PostgreSQL user "John" with REVOKE SELECT columns= from him.<br> but "REVOKE SELECT (ipp , nom_nais , nom , prenom) ON TABLE table1 FRO= M "John";" command doesn't work in my script above :<br> <br> Here is how I created the user "John":<br> <br> CREATE ROLE "john";<br> REVOKE ALL PRIVILEGES ON DATABASE pgdb FROM "john";<br> ALTER ROLE "john" WITH LOGIN;<br> ALTER ROLE "john" WITH PASSWORD 'password' VALID UNTIL '2018-12-3= 1';<br> GRANT CONNECT ON DATABASE dbpg TO "john";<br> GRANT USAGE ON SCHEMA schema1 TO "john";<br> <div>----- <span lang=3D"en">forbid access to 4 columns of Table1</span><br= > </div> <div>REVOKE SELECT (ipp , nom_nais , nom , prenom) ON TABLE Table1 FROM &qu= ot;John";</div> <div><br> </div> <div>Result :<br> </div> <div>The 4 columns are still displayed.<br> </div> <div>The "REVOKE SELECT column" doen't work. I manage always to s= elect values in the 4 columns.</div> <div style=3D"font-family: Times New Roman; color: #000000; font-size: 16px= "> <div> <div style=3D"direction:ltr; font-family:Tahoma; color:#000000; font-size:1= 0pt"> <div><br> </div> <div>Can you see why John can still watch the 4 columns ?</div> <div>Is a comand missing in this script ?</div> <div>Database version is 9.6.<br> </div> <div><br> </div> <div>Thanks a lot for your help !</div> <div><br> </div> <div>Etienne DECHERF</div> <div>DBA<br> </div> <div>[email protected]</div> <div>+33 6 67462246</div> <div><br> </div> <br> </div> </div> </div> </div> </body> </html> --_000_35B45AE5854FD442A1775EB1337F9701C8C50CBBSEXCMBXP005wpro_--