[ 
https://issues.apache.org/jira/browse/IGNITE-21431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ivan Zlenko updated IGNITE-21431:
---------------------------------
    Labels: MakeTeamcityGreenAgain ignite-3  (was: ignite-3)

> Datetime functions should return same value within transaction
> --------------------------------------------------------------
>
>                 Key: IGNITE-21431
>                 URL: https://issues.apache.org/jira/browse/IGNITE-21431
>             Project: Ignite
>          Issue Type: New Feature
>          Components: sql ai3
>            Reporter: Maksim Myskov
>            Priority: Major
>              Labels: MakeTeamcityGreenAgain, ignite-3
>
> It's guaranteed for datetime functions to be the same within a statement.
> From SQL standard:
> {quote}The <datetime value function>s CURRENT_DATE, CURRENT_TIME, and 
> CURRENT_TIMESTAMP
> respectively return the date, time, and timestamp from the current 
> SQL-session context's statement times-
> tamp; the time and timestamp values are returned with time zone displacement 
> equal to the current default
> time zone displacement of the SQL-session
> {quote}
>  
> I believe it's an open question how to interpret the above, however, 
> PostgreSQL, for example, states the following 
> ([https://www.postgresql.org/docs/current/sql-createfunction.html|https://www.postgresql.org/docs/current/sql-createfunction.html:]):
> {quote}{{STABLE}} indicates that the function cannot modify the database, and 
> that within a single table scan it will consistently return the same result 
> for the same argument values, but that its result could change across SQL 
> statements. This is the appropriate selection for functions whose results 
> depend on database lookups, parameter variables (such as the current time 
> zone), etc. (It is inappropriate for {{AFTER}} triggers that wish to query 
> rows modified by the current command.) *Also note that the 
> {{current_timestamp}} family of functions qualify as stable, since their 
> values do not change within a transaction.*
> {quote}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to