Re: Changing behavior of BEGIN...sleep...do something...COMMIT

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Changing behavior of BEGIN...sleep...do something...COMMIT
Дата
Msg-id 806.1048977918@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Changing behavior of BEGIN...sleep...do something...COMMIT  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Changing behavior of BEGIN...sleep...do something...COMMIT  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Alvaro Herrera wrote:
>> While at this, what do you think about adding the necessary variables
>> to make now('transaction') and now('query') possible?

> TODO already has:
>     * Add now("transaction|statement|clock") functionality

I know that's what we agreed to awhile back, but I've realized that that
would be a foolish way to do it.

The problem is that such a function would have to be marked VOLATILE,
which would prevent its use in indexscan qualifiers.  The volatility
labeling is a property of the function, not of the particular argument
it's passed, so we'd have to label it for the worst-case behavior.

Accordingly, it's a bad idea to invent now('clock') and make it the
same function as the other flavors.  We could get away with making
now('transaction') and now('statement') ---- but the argument for this
was consistency, and that argument pretty much falls flat if those two
are one function while clock time is something else.

So I'm back in the camp of thinking three separate parameterless
functions are the way to do it.  We already know what now() does,
and we're not going to change it --- anyone want to propose names
for the other two?
        regards, tom lane



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

Предыдущее
От: "Hiroshi Inoue"
Дата:
Сообщение: Re: updateable cursors & visibility
Следующее
От: Doug McNaught
Дата:
Сообщение: Re: Changing behavior of BEGIN...sleep...do something...COMMIT