Search Postgresql Archives

[no subject]

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

 



Hello all.

I'm working on a kind of permissions management and I would like to add restrictions on SELECT statements depending on certain fields of a row.

tablename :
id,
perm_field1,
..
..
perm_field2,
data_field1,
data_field2,
...

Do you know if it is possible to write such things :

SELECT * FROM tablename WHERE permission(some parameters) == TRUE;

with the function 'permission' returning TRUE or FALSE after a check on different perm_fields of the current row.

My problem is that I don't really know how to access to the fields of the current row with an external function.

How could I write this ?

Thx for help.
Max





[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