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

feat: add support SELECT all columns from function result #2207

Conversation

0xlianhu
Copy link
Contributor

@0xlianhu 0xlianhu commented Mar 26, 2025

PostgreSQL supports composite type expansion using .*, for example, below query is valid in PostgreSQL:

SELECT (pg_stat_file('postgresql.conf')).*

More generic one is like below one in queries or sub-queries:

SELECT (function_name(param1, ... paramN)).* FROM my_table ...

There might be multiple duplicated parentheses surround the function call, such as:

SELECT (((pg_stat_file('postgresql.conf')))).* -- this is same effect as one `()` surrounding

The PR is adding the support to parse/deparse this type of SQLs.

PostgreSQL supports composite type expansion using .*,
for example below query is valid in PostgreSQL:
SELECT (pg_stat_file('postgresql.conf')).*
@manticore-projects
Copy link
Contributor

Beautifully executed! Well done and thank you much for your effort and contribution.

@manticore-projects manticore-projects merged commit 30cf5d7 into JSQLParser:master Mar 26, 2025
3 of 4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants