From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jaime Casanova <systemguards(at)gmail(dot)com> |
Cc: | PG Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: avoid pulling up subquerys that contain volatile functions? |
Date: | 2005-10-09 16:24:29 |
Message-ID: | 6755.1128875069@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jaime Casanova <systemguards(at)gmail(dot)com> writes:
> On 10/8/05, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> This is exactly the same example discussed in previous threads on this
>> issue. Do you think it will change anyone's mind?
> in any case, i still think that is better to get bad performance
> because i forgot to correctly mark a function that to get incorrect
> data from a correct query because a "gotcha"... there is a precedent
> for this in postgres???
Just to be clear, I'm in favor of changing it; but the majority opinion
in the previous discussion seemed to be against.
> ... but i don't understand why when i add the function
> contain_volatile_functions in the is_simple_subquery function i got
> the same results... :)
You should only be enforcing the restriction against the subquery's
target list anyway. The expression_returns_set test is the model to
follow. BTW, you'll also need to make some fixes in allpaths.c, else
you'll still get bit by qual pushdown; again, look for
expression_returns_set.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Neil Conway | 2005-10-09 17:55:39 | Re: fixing LISTEN/NOTIFY |
Previous Message | Brian A. Seklecki | 2005-10-09 14:57:49 | Re: Help needed to complile postgresql on Mac. |