Re: Column Redaction

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Column Redaction
Дата
Msg-id 5437BFDF.9010202@vmware.com
обсуждение исходный текст
Ответ на Re: Column Redaction  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: Column Redaction
Список pgsql-hackers
On 10/10/2014 02:05 PM, Stephen Frost wrote:
> * Heikki Linnakangas (hlinnakangas@vmware.com) wrote:
>> On 10/10/2014 01:35 PM, Stephen Frost wrote:
>>> Regarding functions, 'leakproof' functions should be alright to allow,
>>> though Heikki brings up a good point regarding binary search being
>>> possible in a plpgsql function (or even directly by a client).  Of
>>> course, that approach also requires that you have a specific item in
>>> mind.
>>
>> It doesn't require that you have a specific item in mind. Binary
>> search is cheap, O(log n). It's easy to write a function to do a
>> binary search on a single item, passed as argument, and then apply
>> that to all rows:
>>
>> SELECT binary_search_reveal(cardnumber) FROM redacted_table;
>
> Note that your binary_search_reveal wouldn't be marked as leakproof and
> therefore this wouldn't be allowed.  If this was allowed, you'd simply
> do "raise notice" inside the function and call it a day.

*shrug*, just do the same with a more complicated query, then. Even if 
you can't create a function that does that, you can still execute the 
same logic without a function.

- Heikki




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

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: Column Redaction
Следующее
От: Thom Brown
Дата:
Сообщение: Re: Column Redaction