Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-6634

Postgres TO_TIMESTAMP: literals are not supported

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.38.0
    • None
    • core
    • None

    Description

      The following unit test will fail if added to PostgresqlDateTimeFormatterTest

      @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));
      }
      

      According to the documentation postgres supports literals in format strings enclosed in double quotes.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kramerul Ulrich Kramer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: