From: | Bernd Helmle <mailings(at)oopsware(dot)de> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bernd Helmle <mailings(at)oopsware(dot)de> |
Cc: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Thoughts about updateable views |
Date: | 2004-03-22 23:15:35 |
Message-ID: | 110580000.1079997335@sparkey.oopsware.intra |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
--On Montag, März 22, 2004 18:00:55 -0500 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
wrote:
>
> That sounds bogus to me. It's obvious that columns not present in the
> view can't be updated through the view --- you simply do not have a way
> to name them, so how could you affect them?
>
> What the spec actually says, if I'm reading it correctly, is that CHECK
> OPTION forbids you from using the view to insert/update *rows* that
> would not appear in the view. For example given
>
> CREATE VIEW v AS SELECT * FROM t WHERE flag != 42
> WITH CHECK OPTION;
>
> you could see the "flag" column in the view, and could set it on insert
> or update --- so long as you didn't try to set it to 42. That would
> mean that the result row was invisible in the view, which is what CHECK
> OPTION forbids.
>
Ah, okay. I should have read this more carefully. Thanks for the
clarification. No it
makes sense....
--
Bernd
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2004-03-22 23:27:45 | Re: pg_autovacuum next steps |
Previous Message | Tom Lane | 2004-03-22 23:07:12 | Re: Thoughts about updateable views |