-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement now/current_date/current_time/current_timestamp #2870
Comments
This function is not deterministic, and cannot be implemented in stream engine. |
ahh, I see, but in batch it's can be supported right? |
They are not pure functions. Maybe we should rewrite them as literals in frontend rather than pass them to backend |
For streaming engine, an option is to implement An alternative is to add a hidden |
If we want to change its underlying meaning, we'd better use a new function name and tells user |
rw_timestamp_now() ! |
We may also use this semantic for However, users get a benefit that he can now just copy the batch query to |
What if epoch is set to a large value(for example, several minutes)? |
That's a problem 🤔 Unless we decouple epoch from checkpoint |
Any progress with this? 🤔 |
If you are seeking a continuously changing timestamp in the stream, please refer to #7209, which has both better-defined semantics and more straightforward implementation. |
My idea is to forbid |
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I think
now
is one of the most important functions around time. I'm a little surprised that we don't support that.https://www.postgresql.org/docs/current/functions-datetime.html
now ( ) → timestamp with time zone
Current date and time (start of current transaction); see Section 9.9.5
now() → 2019-12-23 14:39:53.662522-05
current_timestamp → timestamp with time zone
Current date and time (start of current transaction); see Section 9.9.5
current_timestamp → 2019-12-23 14:39:53.662522-05
PostgreSQL support several different times:
timestamptz 'now'
current_xxx
,localxxx
,transaction_timestamp()
,now()
statement_timestamp()
f() = f()
may befalse
depending on resolution):clock_timestamp()
,timeofday()
The text was updated successfully, but these errors were encountered: