Need timestamp function that will change within a transaction

From: "D(dot) Dante Lorenso" <dante(at)lorenso(dot)com>
To: Postgres-General <pgsql-general(at)postgresql(dot)org>
Subject: Need timestamp function that will change within a transaction
Date: 2008-05-14 19:56:42
Message-ID: 482B43FA.1020200@lorenso.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'd like to find a timestamp function that WILL change within a transaction.

This function will return to me a 15 digit BIGINT number in base10:

SELECT FLOOR(EXTRACT(EPOCH FROM NOW()) * 100000)::bigint;

The problem is that NOW() does not change within a transaction and so I
keep getting the same value. Is there a function that will return a
timestamp that is NOT consistent within a transaction?

-- Dante

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Atkins 2008-05-14 20:01:07 Re: Need timestamp function that will change within a transaction
Previous Message Sam Mason 2008-05-14 19:27:19 Re: rounding problems