Skip to content

[BUG] JSQLParser Version 5.4-Snapshot : PostgreSQL : 2nd Function Parameter with schema/table/column can't be parsed #2290

@davyboyhayes

Description

@davyboyhayes

Failing SQL Feature:

  • Using a function with more than one parameter, where the second parameter includes schema.table.column, with an addition to an Interval, can't be parsed. However, if the same parameter is used as a singular parameter, or the same multi-parameter function is used without schema, the SQL can be parsed.

SQL Example:

  • Simplified Query Example, focusing on the failing feature
SELECT
  DATE_TRUNC(
  'week',
    (
      "schema"."tbl"."column" + INTERVAL '1 day'
    )
  )
FROM
"schema"."tbl";

Note that:

SELECT
DATE_TRUNC(
'week',
  (
    "tbl"."column" + INTERVAL '1 day'
  )
)
FROM
"schema"."tbl";

and

SELECT
  FUNC(
    (
      "schema"."tbl"."column" + INTERVAL '1 day'
    )
  )
FROM
"schema"."tbl";

both work

Image

Software Information:

  • JSqlParser 5.4-Snapshot (f10b52e)
  • PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions