Subject | Re: [firebird-support] Firebird 1.5 RC6: current_timestamp value fixed |
---|---|
Author | Helen Borrie |
Post date | 2003-09-15T11:20:14Z |
At 10:55 AM 15/09/2003 +0000, you wrote:
Yup, this is according to the standard for CURRENT_TIMESTAMP.
At some point, you could get a fresh timestamp for each DML operation by
using CAST ('NOW' AS TIMESTAMP). I tested this with RC 5 with 10,000
updates in a single operation and it seems now to conform with
CURRENT_TIMESTAMP. At some time past, it would give you the timestamp for
the discrete DML action.
You might like to test this on a slow connection...it's hard to tell on my
system, because it's very fast. The 10,000 updates were probably
subsecond. Since both CURRENT_TIMESTAMP and 'NOW' record the sub-second
portion as zero always, I really can't verify the case with 'NOW'.
If it turns out that 'NOW' is now exactly the same as CURRENT_TIMESTAMP,
you could use the UDF GetExactTimestamp.
heLen
If it turns out
>I have discovered that the value returned by current_timestamp is[massive snip]
>fixed within the scope of any given stored procedure call. So during
>the scope of such a call any directly (via a call to another
>procedure) or indirectly (via a trigger firing in response to record
>manipulations) called stored program units will also return the same
>value.
Yup, this is according to the standard for CURRENT_TIMESTAMP.
At some point, you could get a fresh timestamp for each DML operation by
using CAST ('NOW' AS TIMESTAMP). I tested this with RC 5 with 10,000
updates in a single operation and it seems now to conform with
CURRENT_TIMESTAMP. At some time past, it would give you the timestamp for
the discrete DML action.
You might like to test this on a slow connection...it's hard to tell on my
system, because it's very fast. The 10,000 updates were probably
subsecond. Since both CURRENT_TIMESTAMP and 'NOW' record the sub-second
portion as zero always, I really can't verify the case with 'NOW'.
If it turns out that 'NOW' is now exactly the same as CURRENT_TIMESTAMP,
you could use the UDF GetExactTimestamp.
heLen
If it turns out