Thanks, Tom
Can this be clarified in docs? It is stated there now that scalar subquery
is one of the kinds of expressions
and it is somewhat counter-intuitive that an expression may sometimes not
respect its own degree of volatility.
On Wed, Sep 1, 2010 at 2:16 AM, Tom Lane wrote:
> Vyacheslav
Vyacheslav Kalinin writes:
> I just got my hands on mysql (5.0.something) and it does not cache the
> scalar subquery result.
> So... now I'm completely puzzled whether this is a bug, a desired result or
> just a loosely standardized thing.
It's loosely standardized.
AFAICS, the spec doesn't add
I just got my hands on mysql (5.0.something) and it does not cache the
scalar subquery result.
So... now I'm completely puzzled whether this is a bug, a desired result or
just a loosely standardized thing.
Help anyone?
On Fri, Aug 27, 2010 at 5:41 PM, Vyacheslav Kalinin wrote:
> Hi,
>
> Apparent
Hi,
Apparently scalar subquery when used as a part of SELECT statement and when
it does not depend on outer query columns
is executed only once per statement, e.g.:
postgres=# select i, (select random()) rand from generate_series(1, 3) i;
i | rand
---+---
1 | 0.99231982603