- Архив списков рассылки pgsql-general

Поиск
Список
Период
Сортировка
От Max
Тема
Дата
Msg-id 71D7955E-C135-44B1-A5DF-8F41A57FFAAE@gmail.com
обсуждение исходный текст
Ответы Re:  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-general
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




В списке pgsql-general по дате отправления:

Предыдущее
От: Pavel Velikhov
Дата:
Сообщение: Using SETOF functions in SQL
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Using SETOF functions in SQL