Search Postgresql Archives

Querying a policy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all!

 

We are evaluating migrating our software RLS to Postgres by using policies.

 

Having a "FOR UPDATE POLICY" on a table, I was wondering if there is a way to know, before trying an Update and getting an error, if the current row can be updated ?

 

The goal is to show or hide the edit button in my software forms or lists.

 

I know that this query can return the CHECK condition of my POLICY:

SELECT pg_get_expr(polwithcheck, polrelid, true) FROM pg_policy;

 

But is there a simpler way to get the ids the current user can read and the ones that he can update?

 

Thank you!

 

Jeff

 


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux