Re: [COMMITTERS] pgsql: WITH CHECK OPTION support for auto-updatable VIEWs

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: [COMMITTERS] pgsql: WITH CHECK OPTION support for auto-updatable VIEWs
Дата
Msg-id 20130730100952.GA3872@depesz.com
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: WITH CHECK OPTION support for auto-updatable VIEWs  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Ответы Re: [COMMITTERS] pgsql: WITH CHECK OPTION support for auto-updatable VIEWs  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Список pgsql-hackers
On Tue, Jul 30, 2013 at 09:23:19AM +0100, Dean Rasheed wrote:
> >> > > create table some_data (id int4 primary key, payload text);
> >> > > create view first as select * from some_data where 0 = id % 2 with local check option;
> >> > > create view second as select * from first where 0 = id with local check option;
> > [...]
> >> the check is "0 = id % 3" - i.e. id has to be multiply of 3. Sorry if my
> >> way of writing conditionals is confusing.
> Yes it definitely looks like a typo in the test --- the definition of
> "first" has "id % 2", so it is checking for even numbers, not for
> numbers divisible by 3.

Sorry, my bad - must have screwed copy/paste.
the second view is:
select * from first where 0 = id % 3 with local check option;

> As for the point about which of the checks should be failing, I
> believe that the current behaviour is correct.

In such case, can you show me what is the difference of "local check"
and "cascaded check"?
Because I assumed, after reading the commit log, that local checks just
the view definition of the view I'm inserting to, and the cascaded
check, checks all the views "upstream".

Given the assumption that current code works correctly - both checks
check also the upstream view.

Best regards,

depesz




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

Предыдущее
От: Dean Rasheed
Дата:
Сообщение: Re: [COMMITTERS] pgsql: WITH CHECK OPTION support for auto-updatable VIEWs
Следующее
От: Dean Rasheed
Дата:
Сообщение: Re: [COMMITTERS] pgsql: WITH CHECK OPTION support for auto-updatable VIEWs