Re: ODBC Layer and the now() function - Mailing list pgsql-general

From Tom Lane
Subject Re: ODBC Layer and the now() function
Date
Msg-id 29463.1133794762@sss.pgh.pa.us
Whole thread Raw
In response to ODBC Layer and the now() function  (Byrne Kevin-kbyrne01 <kbyrne01@motorola.com>)
List pgsql-general
Byrne Kevin-kbyrne01 <kbyrne01@motorola.com> writes:
> Moserver receives the event - timestamps it as 't1'
> -- time lapse before moserver computes the transaction and gives it to odbc.
> Txn_begin-  now() gets frozen to 't2'
> Insert - now() should put it as 't2'
> Txn_end()- done.

> So firstly t2 should always be > t1 and the difference could be a few seconds but I found sometimes t2 < t1!..

I'd wonder about clock skew between the machine that's running
"moserver" and the machine running Postgres.

Another possibility is that the "transaction begin" doesn't happen when
you think it does.  Sometimes driver-level code like ODBC will issue
BEGIN behind your back ...

            regards, tom lane

pgsql-general by date:

Previous
From: Timothy Perrigo
Date:
Subject: unsubscribe
Next
From: Frank.Motzkat@ic3s.de
Date:
Subject: how to use SAVEPOINT in stored function