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

Deparser: Add support for COALESCE and other expressions in LIMIT clause #199

Merged
merged 1 commit into from
Aug 4, 2023

Conversation

lfittl
Copy link
Member

@lfittl lfittl commented Jul 8, 2023

We've previously supported "c_expr" being used in a LIMIT clause, but its actually more correct to treat this as "a_expr", which is a broader set of functions, including COALESCE.

Note that the previous handling (for "c_expr") is still correct for FETCH FIRST (expr) ROWS WITH TIES, see the "select_fetch_first_value" in the Postgres grammar.

In passing fix two new warnings in the deparser caused by a recent code addition.

We've previously supported "c_expr" being used in a LIMIT clause, but
its actually more correct to treat this as "a_expr", which is a broader
set of functions, including COALESCE.

Note that the previous handling (for "c_expr") is still correct for
FETCH FIRST (expr) ROWS WITH TIES, see the "select_fetch_first_value"
in the Postgres grammar.

In passing fix two new warnings in the deparser caused by a recent code
addition.
@lfittl lfittl requested a review from a team July 10, 2023 06:08
@lfittl lfittl merged commit c6ed461 into 15-latest Aug 4, 2023
@lfittl lfittl deleted the deparser-fix-limit-a-expr branch August 4, 2023 21:36
msepga added a commit that referenced this pull request Aug 4, 2023
msepga added a commit that referenced this pull request Aug 4, 2023
* Fix builds on glibc >= 2.38

`glibc` now defines `strchrnul`, so we add a check to see if `glibc` is
being used, and instead import the symbol if so.

* Bump version to 4.2.3

* Add note about PR #199 in 4.2.3 changelog
longqimin pushed a commit to longqimin/libpg_query that referenced this pull request Nov 20, 2023
* Fix builds on glibc >= 2.38

`glibc` now defines `strchrnul`, so we add a check to see if `glibc` is
being used, and instead import the symbol if so.

* Bump version to 4.2.3

* Add note about PR pganalyze#199 in 4.2.3 changelog
longqimin pushed a commit to longqimin/libpg_query that referenced this pull request Nov 21, 2023
…use (pganalyze#199)

We've previously supported "c_expr" being used in a LIMIT clause, but
its actually more correct to treat this as "a_expr", which is a broader
set of functions, including COALESCE.

Note that the previous handling (for "c_expr") is still correct for
FETCH FIRST (expr) ROWS WITH TIES, see the "select_fetch_first_value"
in the Postgres grammar.

In passing fix two new warnings in the deparser caused by a recent code
addition.
longqimin pushed a commit to longqimin/libpg_query that referenced this pull request Nov 21, 2023
* Fix builds on glibc >= 2.38

`glibc` now defines `strchrnul`, so we add a check to see if `glibc` is
being used, and instead import the symbol if so.

* Bump version to 4.2.3

* Add note about PR pganalyze#199 in 4.2.3 changelog
fantix pushed a commit to fantix/libpg_query that referenced this pull request Jul 12, 2024
* Fix builds on glibc >= 2.38

`glibc` now defines `strchrnul`, so we add a check to see if `glibc` is
being used, and instead import the symbol if so.

* Bump version to 4.2.3

* Add note about PR pganalyze#199 in 4.2.3 changelog
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