On Friday 01 December 2000 00:33, Tom Lane wrote:
> The rewriting is done, all right, but what's left afterward still has
> references to the view, because each rule is conditional. Essentially,
> the rewriter output looks like
>
> -- rule 1
> if (rule1 condition holds)
> -- rule 2 applied to rule1 success case
> if (rule2 condition holds)
> apply rule 2's query
> else
> apply rule 1's query
> else
> -- rule 2 applied to rule1 failure case
> if (rule2 condition holds)
> apply rule 2's query
> else
> apply original query
>
> If the system were capable of determining that either rule1 or rule2
> condition will always hold, perhaps it could deduce that the original
> query on the view will never be applied. However, I doubt that we
> really want to let loose an automated theorem prover on the results
> of every rewrite ...
I think it would be better to move the test further down, to just before we
actually try to do the update/insert. Maybe into the heap access routines as
suggested by Andreas.
--
Mark Hollomon
In response to
Responses
pgsql-hackers by date
| Next: | From: Tom Lane | Date: 2000-12-02 05:11:23 |
| Subject: Re: ALTER FUNCTION problem |
| Previous: | From: Mark Hollomon | Date: 2000-12-02 02:38:01 |
| Subject: ALTER FUNCTION problem |
pgsql-sql by date
| Next: | From: Ross J. Reedstrom | Date: 2000-12-02 03:27:06 |
| Subject: Re: I can be a BUG? |
| Previous: | From: Edipo E. F. Melo | Date: 2000-12-01 23:48:44 |
| Subject: I can be a BUG? |