Rather than `SELECT DATE();` you likely want `SELECT NOW();`
On Sat, Oct 7, 2023, 09:20 jinser <aimer@purejs.icu> wrote:
Hello, Friends,
Use it like a normal function:
playground=# SELECT DATE(); ERROR: function date() does not exist LINE 1: SELECT DATE(); ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.
playground=# SELECT DATE('2022-01-13'); date ------------ 2022-01-13 (1 row)
Another reason I think this is a function is that other types don't seem to have the same behavior:
playground=# SELECT integer('123'); ERROR: syntax error at or near "(" LINE 1: SELECT integer('123'); ^