You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is date, time and timestamp literals with this syntax:
DATE '2018-01-01'
TIME '10:00:00'
TIMESTAMP '2018-01-01 10:00:00'
They are parsed at compile time.
However, there are weird situation with some literals.
We may use things as DATE 'TODAY', DATE 'TOMORROW', DATE 'YESTERDAY', TIME 'NOW' and TIMESTAMP 'NOW'.
And different than these strings used in CAST, these are literais
(evaluated at compile time).
So if you create a procedure/function with them, they value are
refreshed every time you recompile (from SQL) the routine, but never
refreshed when you run it.
Also imagine a compiled statement cache (implementation detail), a
"select timestamp 'now' from rdb$database" will give stalled results.
These strings will not be accepted with the literals syntax anymore.
Submitted by: @asfernandes
There is date, time and timestamp literals with this syntax:
DATE '2018-01-01'
TIME '10:00:00'
TIMESTAMP '2018-01-01 10:00:00'
They are parsed at compile time.
However, there are weird situation with some literals.
We may use things as DATE 'TODAY', DATE 'TOMORROW', DATE 'YESTERDAY', TIME 'NOW' and TIMESTAMP 'NOW'.
And different than these strings used in CAST, these are literais
(evaluated at compile time).
So if you create a procedure/function with them, they value are
refreshed every time you recompile (from SQL) the routine, but never
refreshed when you run it.
Also imagine a compiled statement cache (implementation detail), a
"select timestamp 'now' from rdb$database" will give stalled results.
These strings will not be accepted with the literals syntax anymore.
Commits: 75d34f8 e84f443
The text was updated successfully, but these errors were encountered: