Bug #801: now() in transaction

Поиск
Список
Период
Сортировка
От pgsql-bugs@postgresql.org
Тема Bug #801: now() in transaction
Дата
Msg-id 20021018112329.B000D475AA1@postgresql.org
обсуждение исходный текст
Ответы Re: Bug #801: now() in transaction  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-bugs
Bhuvan A (bhuvansql@myrealbox.com) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
now() in transaction

Long Description
I am using 7.2.1. now() returns same value ever, within transaction. If we use now() say 10 times in the same
transaction,all 10 times we are getting the same value, irrespect of the interval. 7.2 too behaves similar.  

AFAIK, we had similar problem in plpgsql in 7.1 and earlier. The constant values interpreted within begin block(in
plpgsql)was used on all invocations of the function, during the lifetime of backend. This behaviour have been changed
in7.2 and it behaves how the programmer expect it to! But why it should happen in normal transaction now? 

Kindly apologize, if my understanding is wrong.

regards,
bhuvaneswaran


Sample Code
bhuvan=> begin;
BEGIN
bhuvan=> select now();
               now
---------------------------------
2002-10-18 16:36:41.071665+05:30
bhuvan=> -- wait for few seconds
bhuvan=> select now();
               now
---------------------------------
2002-10-18 16:36:41.071665+05:30
bhuvan=> -- wait for few seconds
bhuvan=> select now();
               now
---------------------------------
2002-10-18 16:36:41.071665+05:30
bhuvan=> -- wait for few seconds
bhuvan=> select now();
               now
---------------------------------
2002-10-18 16:36:41.071665+05:30
bhuvan=> rollback;
ROLLBACK
bhuvan=>

No file was uploaded with this report

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

Предыдущее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: Bug #800: Bad free in function PQclear
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Bug #801: now() in transaction