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)