Hi all,

> Yes, we'll have to document this clearly:
>
> - When used with CAST() they are evaluated each time the code is executed and 
> return the current date (or, in the case of 'now', timestamp). In this case, 
> they are more up-to-date than the CURRENT_<DATETIME> variables, which are 
> evaluated once per request (thus staying the same during a PSQL module 
> execution, for instance).
>
> - When used as shorthand casts / datetime literals they are evaluated only 
> once: at parse/prepare time. In this case, they are often *less* up-to-date 
> than the CURRENT_<DATETIME> variables, because the latter are refreshed every 
> time a prepared query is executed again.

I've update the LRU and committed. Thomas, you may be interested to copy some 
or all of these changes into the LangRef:

  Context variables :: CURRENT_TIME: Edited second Note to warn against 
shorthand syntax.
  Context variables :: CURRENT_TIMESTAMP: Edited second Note to warn against 
shorthand syntax.
  Context variables :: 'NOW': Edited the two existing Notes and inserted one 
about the freeze effect of the shorthand syntax.
  Internal functions :: CAST(): Added notice that when using the shorthand 
syntax, the value stays the same as long as the statement remains prepared.

Of course you can also make your own edits.


Cheers,
Paul Vinkenoog

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Firebird-docs mailing list
Firebird-docs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-docs

Reply via email to