From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Zhenghua Lyu <zlyu(at)vmware(dot)com> |
Cc: | "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: distribute_restrictinfo_to_rels if restrictinfo contains volatile functions |
Date: | 2020-07-10 14:10:46 |
Message-ID: | 2056767.1594390246@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Zhenghua Lyu <zlyu(at)vmware(dot)com> writes:
> The where clause is "pushed down to the x,y" because it only references these two relations.
Yeah. I agree that it's somewhat unprincipled, but changing it doesn't
seem like a great idea. There are a lot of users out there who aren't
terribly careful about marking their UDFs as non-volatile, but would be
unhappy if the optimizer suddenly crippled their queries because of
being picky about this.
Also, we specifically document that order of evaluation in WHERE clauses
is not guaranteed, so I feel no need to make promises about how often
volatile functions there will be evaluated. (Volatiles in SELECT lists
are a different story.)
This behavior has stood for a couple of decades with few user complaints,
so why are you concerned about changing it?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2020-07-10 14:17:14 | Re: Default setting for enable_hashagg_disk |
Previous Message | Tom Lane | 2020-07-10 14:01:00 | Re: Implement UNLOGGED clause for COPY FROM |