Re: Delaying the planning of unnamed statements until Bind

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Delaying the planning of unnamed statements until Bind
Date: 2004-06-14 13:15:02
Message-ID: 27907.1087218902@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Oliver Jowett <oliver(at)opencloud(dot)com> writes:
> I guess that ExprState does not live long enough to be useful.

Actually the opposite: it lasts too long, namely the entire execution of
a query. I don't think there's any convenient way to reset it on the
timescale appropriate for STABLE values (ie, once per scan, as opposed
to once per query).

> How about introducing a function modifier that provides stronger
> guarantees than STABLE, along the lines of "immutable during execution
> of a single SQL statement"?

Why?

I suspect that if we did have two flavors of STABLE, we'd just have a
lot of people getting it wrong :-(. A big advantage of the current
definition is exactly that it is pretty weak...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-06-14 13:19:50 Re: Weird 'bit' type behaviour
Previous Message Tom Lane 2004-06-14 12:52:14 Re: Releasing 7.4.3 ...