Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fully qualified Postgres functions incorrectly parsed #944

Closed
SerialVelocity opened this issue Feb 3, 2020 · 2 comments
Closed

Fully qualified Postgres functions incorrectly parsed #944

SerialVelocity opened this issue Feb 3, 2020 · 2 comments
Assignees

Comments

@SerialVelocity
Copy link
Contributor

When parsing something like:

SELECT pg_catalog.now()

Expected behaviour is for the function name to be now with a schema name of pg_catalog.

Instead, there is no getSchemaName method and the getName returns pg_catalog.now.

System

  • Database you are using: Postgres
  • Java Version: 11
  • JSqlParser version: 3.1
@wumpz
Copy link
Member

wumpz commented Feb 4, 2020

Using columns or tables this is solved using a multipart name behind the scenes. One could implement this here as well. Since JSqlParser wants to provide parsing for multiple DB dialects it is not clear, what the first part of pg_catalog.now() really is. For instance using JQL from some JPA stuff, it could be a package name.

@wumpz wumpz self-assigned this Feb 4, 2020
@wumpz
Copy link
Member

wumpz commented Feb 14, 2020

Now JSqlParser supports multipart names for functions.

@wumpz wumpz closed this as completed in 22117c4 Feb 14, 2020
wumpz added a commit that referenced this issue Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants