Re: [PATCHES] Updatable views - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCHES] Updatable views
Date
Msg-id 5155.1157125276@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCHES] Updatable views  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCHES] Updatable views  (Bernd Helmle <mailings@oopsware.de>)
List pgsql-hackers
Bernd Helmle <mailings@oopsware.de> writes:
> What we can do is to restrict view updates that involves a volatile function
> completely. As soon as the rewriter wants to apply an implicit system rule
> to a current query which holds volatile functions, we could treat this as 
> an error.

So in other words, views on serial columns don't work?  I don't think
that's going to be acceptable.

> In order you want to do a CASCADED CHECK OPTION,
> you need to collect all expressions out of underlying relations and rewrite 
> them to match
> the table you are selecting...that looks like a very expensive operation.

Not really worse than what the rewriter is doing already --- in fact,
I think it's isomorphic to what would happen to the rule qual
expressions in your existing patch.

> So we need to stall this idea unless we have something workable in
> this area. So what's the plan for 8.2? Should we reject updatable
> views completely or is there some interest to apply this without CHECK
> OPTION?

I'm about to propose that we should try to go beta next week (see
forthcoming message).  If you can strip down your patch to avoid the
multi-eval problems in the next couple of days, I'm still willing to
consider it, but at the moment I'm assuming that it needs to be held
for 8.3.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [PATCHES] Updatable views
Next
From: Gregory Stark
Date:
Subject: Re: Sort performance