From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Bernd Helmle <mailings(at)oopsware(dot)de> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PATCHES] Updatable views |
Date: | 2006-09-01 15:34:49 |
Message-ID: | 20060901153449.GE3755@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Bernd Helmle wrote:
> <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >* It's too early in the morning for me to be clear about the difference
> >between CASCADED and LOCAL CHECK OPTION --- I think that this would
> >merely alter the set of check constraints collected for a particular
> >query, but if there's something more fundamental there, this scheme
> >might not work at all. So look into that first.
>
> LOCAL checks the data to be updated against its own view WHERE
> condition only, where CASCADED involves all WHERE conditions of all
> underlying views.
I don't understand this part very well. Say if you have a view WITH
CHECK OPTION whose condition is "foo > 5", and then define a view WITH
LOCAL CHECK OPTION on top of that, whose condition is "bar > 5". Does
the local check option on the second view that I can insert a row with
foo=4, bar=6? That doesn't violate the condition of bar > 5, so it
seems fine to me. But it also seems quite idiotic because it violated
the original foo>5 condition.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-09-01 15:41:16 | Re: [PATCHES] Updatable views |
Previous Message | Bernd Helmle | 2006-09-01 15:30:44 | Re: [PATCHES] Updatable views |