Re: Delaying the planning of unnamed statements until Bind

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Delaying the planning of unnamed statements until Bind
Дата
Msg-id 27907.1087218902@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Delaying the planning of unnamed statements until Bind  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: Delaying the planning of unnamed statements until Bind  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-hackers
Oliver Jowett <oliver@opencloud.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Releasing 7.4.3 ...
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Weird 'bit' type behaviour