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

Add PostgreSQL 17 compatibility #44

Merged
merged 1 commit into from
Feb 2, 2025
Merged

Add PostgreSQL 17 compatibility #44

merged 1 commit into from
Feb 2, 2025

Conversation

rjuju
Copy link
Collaborator

@rjuju rjuju commented Feb 2, 2025

Postgres 17 changed some of the lexer token numbering, so introduce a new pgsp_token_types.h file to force the declaration of the needed token per major version and avoid using wrong values.

The JsonLexContext structure changed again and added extra ability to free part of the struct, which leads to wrong parsing results if not setup correctly. Fortunately upstream makeJsonLexContextCstringLen() has been changed to handle stack-allocated structs so we can now rely on this function from now on to avoid misbehavior in case of further changes to JsonLexContext.

blk_read_time and blk_write_time BufferUsage fields have been renamed to include a "shared" prefix, so handle it.

Finally, enable test on pg17 in the CI.

Postgres 17 changed some of the lexer token numbering, so introduce a new
pgsp_token_types.h file to force the declaration of the needed token per major
version and avoid using wrong values.

The JsonLexContext structure changed again and added extra ability to free part
of the struct, which leads to wrong parsing results if not setup correctly.
Fortunately upstream makeJsonLexContextCstringLen() has been changed to handle
stack-allocated structs so we can now rely on this function from now on to
avoid misbehavior in case of further changes to JsonLexContext.

blk_read_time and blk_write_time BufferUsage fields have been renamed to
include a "shared" prefix, so handle it.

Finally, enable test on pg17 in the CI.

Co-authored-by: Devrim Gunduz <[email protected]>
@rjuju rjuju merged commit 655864e into master Feb 2, 2025
5 checks passed
@rjuju rjuju deleted the pg17 branch February 2, 2025 02:38
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.

1 participant