Subject | Re: [firebird-support] Re: Making evaluation of UDFs constant across a query |
---|---|
Author | Helen Borrie |
Post date | 2011-03-21T18:08:13Z |
At 04:58 AM 22/03/2011, Mike Pomraning wrote:
CURRENT_TIMESTAMP context is the CURRENT_TRANSACTION
Date literal 'NOW' context is the executing statement
UDF GetExactTimestamp() refreshes with each call to the function
./heLen
>> Hmm, is there a way in the API to determine the transactional scope of theNot in the API, in SQL itself. Quick hints here: you test...
>> currently executing query, finer-grained than CURRENT_TRANSACTION? I
>> suppose CURRENT_TIMESTAMP effectively serves that purpose.
CURRENT_TIMESTAMP context is the CURRENT_TRANSACTION
Date literal 'NOW' context is the executing statement
UDF GetExactTimestamp() refreshes with each call to the function
>It occurs to me that this naive caching keyed on CURRENT_TIMESTAMPIf you need UTC time then run your server in UTC time.
>will be incorrect during some daylight savings changes, when an hour
>repeats itself. Drat.
./heLen