Re: Thinking about WITH CHECK OPTION for views

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Thinking about WITH CHECK OPTION for views
Date: 2013-01-20 16:30:01
Message-ID: 20130120163001.GP16126@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dean,

* Dean Rasheed (dean(dot)a(dot)rasheed(at)gmail(dot)com) wrote:
> I've been thinking about WITH CHECK OPTION for auto-updatable views.
> Given the timing I doubt if this will be ready for 9.3, since I only
> get occasional evenings and weekends to hack on postgres, but I think
> it's probably worth kicking off a discussion, starting with a
> description of what the feature actually is.

If this isn't intended for 9.3, I think it'd be good to move it to the
post-9.3 commitfest. That said, it actually looks pretty decent to me
on first blush. I did have a couple of comments though:

Why have validateWithCheckOption instead of handling that in gram.y..?

If the SQL spec says we should be disallowing WITH CHECK when there are
INSTEAD rules or triggers, could we actually do that..? This kind of an
error:

ERROR: attribute number 2 exceeds number of columns 1

is really pretty bad, any chance we could improve that or disallow the
possibility of getting there by erroring earlier on?

Lastly, documentation for this appears to be missing.

Thanks,

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-01-20 16:38:27 Re: [WIP] pg_ping utility
Previous Message Robert Haas 2013-01-20 16:28:52 Re: allowing privileges on untrusted languages