Re: [GENERAL] values from now() in the same transaction

2007-02-16 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/16/07 17:25, Chris Browne wrote: > [EMAIL PROTECTED] (Vladimir Zelinski) writes: >> I tried function now(),current_timestamp() but all of >> them behave similar. >> >> I don't believe that it's bug, probably it's a feature >> of the postgreSql da

Re: [GENERAL] values from now() in the same transaction

2007-02-16 Thread Bruce Momjian
The problem with gettimeofday() is that it returns a string, rather than a timestamp. This was all clarified in 8.2: Add clock_timestamp(), statement_timestamp(), and transaction_timestamp() (Bruce) clock_timestamp() is the current wall-clock time, statement_timestamp

Re: [GENERAL] values from now() in the same transaction

2007-02-16 Thread Chris Browne
[EMAIL PROTECTED] (Vladimir Zelinski) writes: > I tried function now(),current_timestamp() but all of > them behave similar. > > I don't believe that it's bug, probably it's a feature > of the postgreSql database. Indeed, that is intentional. CURRENT_TIMESTAMP and NOW() return the time at which t

Re: [GENERAL] values from now() in the same transaction

2007-02-16 Thread Vladimir Zelinski
Thank you very much. It works. Vladimir --- Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Vladimir Zelinski wrote: > > > I don't believe that it's bug, probably it's a > feature > > of the postgreSql database. > > Correct. > > > Is any way to insert a timestamp within the same > > transaction

Re: [GENERAL] values from now() in the same transaction

2007-02-16 Thread Alvaro Herrera
Vladimir Zelinski wrote: > I don't believe that it's bug, probably it's a feature > of the postgreSql database. Correct. > Is any way to insert a timestamp within the same > transaction that would have current system time (not > time of the beginning of the transaction)? timeofday() -- Alvaro