Bhuvan A ([EMAIL PROTECTED]) 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 in 7.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


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to