Re: security hook on table creation

Поиск
Список
Период
Сортировка
От KaiGai Kohei
Тема Re: security hook on table creation
Дата
Msg-id 4CA532D8.8010205@ak.jp.nec.com
обсуждение исходный текст
Ответ на Re: security hook on table creation  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: security hook on table creation  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
(2010/10/01 3:09), Robert Haas wrote:
> 2010/9/29 KaiGai Kohei<kaigai@ak.jp.nec.com>:
>> In addition, I want to give these entrypoints its name which
>> represents an appropriate purpose of the hook, rather than
>> a uniformed one.
> 
> It sounds like you're proposing to create a vast number of hooks
> rather than just one.  If we have ~20 object types in the system,
> that's 40 hooks just for create and drop, and then many more to handle
> comment, alter (perhaps in various flavors), etc.  I'm pretty
> unexcited about that.  The main hook function can always dispatch
> internally if it so desires, but I don't see any benefit to forcing
> people to write the code that way.
> 
What I proposed is to create just one hook and wrapper functions
with appropriate name; that calls the hook with appropriate parameters,
such as SearchSysCache1, 2, 3 and 4.

However, the reason why I proposed the wrapper functions is mainly from
a sense of beauty at the code. So, I choose the term of 'my preference'.
Well, at first, I'll try to work on as you suggested.

---
BTW, as an aside, the SearchSysCacheX() interface also inspired me.
If the hook function can deliver a few Datum values depending on object
types and event types, it may allows the main hook to handle most of
security checks, even if we need to add various flavors.

Thanks,
-- 
KaiGai Kohei <kaigai@ak.jp.nec.com>


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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: O_DSYNC broken on MacOS X?
Следующее
От: Greg Smith
Дата:
Сообщение: Re: O_DSYNC broken on MacOS X?