You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Ulrich Kramer (Jira)" <ji...@apache.org> on 2024/10/18 06:06:00 UTC
[jira] [Created] (CALCITE-6634) Postgres TO_TIMESTAMP: literals are not supported
Ulrich Kramer created CALCITE-6634:
--------------------------------------
Summary: Postgres TO_TIMESTAMP: literals are not supported
Key: CALCITE-6634
URL: https://issues.apache.org/jira/browse/CALCITE-6634
Project: Calcite
Issue Type: Bug
Components: core
Affects Versions: 1.38.0
Reporter: Ulrich Kramer
The following unit test will fail if added to {{PostgresqlDateTimeFormatterTest}}
{code:java}
@Test void testLiteral() throws Exception {
final ZonedDateTime time = createDateTime(2024, 1, 1, 0, 0, 0, 0);
assertThat(toTimestamp("2024-01-01 00:00:00" , "YYYY-MM-DD HH24:MI:SS"), is(time));
assertThat(toTimestamp("2024-01-01T00:00:00" , "YYYY-MM-DD\"T\"HH24:MI:SS"), is(time));
}
{code}
According to the documentation postgres supports literals in format strings enclosed in double quotes.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)