Re: [HACKERS] problem with volatile functions in subselects ?

2006-09-02 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: >> If we do it, basically the response to anyone who complains about loss >> of performance should be "fix your function to be marked stable or >> immutable, as appropriate". > Agreed. Are we doing this, or is it a TODO? It's done: http://archives.postgr

Re: [HACKERS] problem with volatile functions in subselects ?

2006-09-02 Thread Bruce Momjian
Tom Lane wrote: > "Jaime Casanova" <[EMAIL PROTECTED]> writes: > >>> There's been some talk about prohibiting flattening if there are any > >>> volatile functions in the subselect's targetlist, but nothing's been > >>> done about that. > > > BTW, can you think in a good name for a GUC for this? >

Re: [HACKERS] problem with volatile functions in subselects ?

2006-08-14 Thread Jim C. Nasby
Based on how small this patch is and the demonstrated desire for this behavior, can we consider putting this in 8.2, even though we're past the deadline? On Sun, Aug 13, 2006 at 10:03:30PM -0500, Jaime Casanova wrote: > On 8/13/06, Tom Lane <[EMAIL PROTECTED]> wrote: > >"Jaime Casanova" <[EMAIL PR

Re: [HACKERS] problem with volatile functions in subselects ?

2006-08-13 Thread Jaime Casanova
On 8/13/06, Tom Lane <[EMAIL PROTECTED]> wrote: "Jaime Casanova" <[EMAIL PROTECTED]> writes: >>> There's been some talk about prohibiting flattening if there are any >>> volatile functions in the subselect's targetlist, but nothing's been >>> done about that. > BTW, can you think in a good name

Re: [HACKERS] problem with volatile functions in subselects ?

2006-08-13 Thread Tom Lane
"Jaime Casanova" <[EMAIL PROTECTED]> writes: >>> There's been some talk about prohibiting flattening if there are any >>> volatile functions in the subselect's targetlist, but nothing's been >>> done about that. > BTW, can you think in a good name for a GUC for this? I'm not in favor of a GUC for

Re: [HACKERS] problem with volatile functions in subselects ?

2006-08-13 Thread Jaime Casanova
> There's been some talk about prohibiting flattening if there are any > volatile functions in the subselect's targetlist, but nothing's been > done about that. Disabling flattening is a sufficiently big hit to > the planner's optimization ability that it shouldn't be done lightly. > >

Re: [HACKERS] problem with volatile functions in subselects ?

2006-08-06 Thread Jaime Casanova
On 7/30/06, Tom Lane <[EMAIL PROTECTED]> wrote: "Sergey E. Koposov" <[EMAIL PROTECTED]> writes: > I see the very strange behaviour with the following set of queries: > wsdb=# select na,nb, na::double precision as da, nb::double precision as db from ( select random()::numeric as na,random()::nu

Re: [HACKERS] problem with volatile functions in subselects ?

2006-07-30 Thread Tom Lane
"Sergey E. Koposov" <[EMAIL PROTECTED]> writes: > I see the very strange behaviour with the following set of queries: > wsdb=# select na,nb, na::double precision as da, nb::double precision as db > from ( select random()::numeric as na,random()::numeric as nb from > generate_series(1,2)) as xx;

[HACKERS] problem with volatile functions in subselects ?

2006-07-30 Thread Sergey E. Koposov
Hello Hackers, I see the very strange behaviour with the following set of queries: wsdb=# select na,nb, na::double precision as da, nb::double precision as db from ( select random()::numeric as na,random()::numeric as nb from generate_series(1,2)) as xx; na |nb