Skip to content

Handle empty projection in Postgres SELECT statements - #1613

Merged
alamb merged 4 commits into
apache:mainfrom
cipherstash:select-without-list
Dec 22, 2024
Merged

Handle empty projection in Postgres SELECT statements#1613
alamb merged 4 commits into
apache:mainfrom
cipherstash:select-without-list

Conversation

@tobyhede

@tobyhedetobyhede commented Dec 20, 2024

Copy link
Copy Markdown
Contributor

Handle empty projections in Postgres and the generic dialect

Statements in the form SELECT FROM table are valid in Postgres

@tobyhedetobyhede changed the title Handle empty projection for pgHandle empty projection in Postgres SELECT statementsDec 20, 2024
@freshtonic

Copy link
Copy Markdown

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.

Comment threadsrc/parser/mod.rs Outdated
Comment threadtests/sqlparser_postgres.rs Outdated
@tobyhede

Copy link
Copy Markdown
ContributorAuthor

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

@iffyioiffyio left a comment

Copy link
Copy Markdown
Contributor

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:mainDec 22, 2024
@alamb

Copy link
Copy Markdown
Contributor

Thanks @tobyhede and @iffyio

Sign up for freeto 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

@tobyhede@freshtonic@alamb@iffyio