Skip to content

Handle empty projection in Postgres SELECT statements #1613

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

Merged
merged 4 commits into from
Dec 22, 2024

Conversation

tobyhede
Copy link
Contributor

@tobyhede tobyhede commented Dec 20, 2024

Handle empty projections in Postgres and the generic dialect

Statements in the form SELECT FROM table are valid in Postgres

@tobyhede tobyhede changed the title Handle empty projection for pg Handle empty projection in Postgres SELECT statements Dec 20, 2024
@tobyhede tobyhede force-pushed the select-without-list branch from dc1f41d to bcdc790 Compare December 20, 2024 01:15
@freshtonic
Copy link

Nice work @tobyhede - that will unblock use of database adapters like Elixir's postgrex with CipherStash Proxy.

postgrex uses SELECT FROM <table> to assert a table's existence and currently the proxy chokes on the SQL parsing.

@tobyhede
Copy link
Contributor Author

Hadn't used the dialect flags before, is much cleaner. Thanks @iffyio

Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @tobyhede!
cc @alamb

@alamb alamb merged commit 27822e2 into apache:main Dec 22, 2024
8 checks passed
@alamb
Copy link
Contributor

alamb commented Dec 22, 2024

Thanks @tobyhede and @iffyio

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.

4 participants