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

support postgresql 15 #180

Merged
merged 2 commits into from
Sep 30, 2024
Merged

support postgresql 15 #180

merged 2 commits into from
Sep 30, 2024

Conversation

Leo-XM-Zeng
Copy link
Contributor

No description provided.

@Leo-XM-Zeng
Copy link
Contributor Author

image

But there's a little problem I don't know how to deal with
image
It cannot be overwritten directly here for fear of affecting versions higher than PG15
image

@Leo-XM-Zeng
Copy link
Contributor Author

'\getenv pwd PWD' is better transformed into '\set pwd' pwd ', which is more general and suitable for more PG versions. #178

@JelteF
Copy link
Collaborator

JelteF commented Sep 16, 2024

Ragarding the problem, you need to apply the equivalent of this change to the ruleutils.c file too: d62ba97

@Leo-XM-Zeng
Copy link
Contributor Author

Ragarding the problem, you need to apply the equivalent of this change to the ruleutils.c file too: d62ba97

That's one step missing. Thank you for your help
image

@Leo-XM-Zeng
Copy link
Contributor Author

@JelteF Hi JelteF, I have a question and I hope you can help me. I wonder if I need to move similar code to "pg_ruleutils_xx.c"? But it doesn't actually belong to "pg_ruleutils". 6025369
image

@Leo-XM-Zeng
Copy link
Contributor Author

Or is there something that needs to be improved in this pull request and is looking forward to your suggestions

src/utility/copy.cpp Outdated Show resolved Hide resolved
@JelteF
Copy link
Collaborator

JelteF commented Sep 17, 2024

Can you make sure this is also run in CI, by adding REL_15_STABLE here:

version: [REL_16_STABLE, REL_17_STABLE]

@Leo-XM-Zeng
Copy link
Contributor Author

Can you make sure this is also run in CI, by adding here: REL_15_STABLE

version: [REL_16_STABLE, REL_17_STABLE]

Okay, thanks. I'll try.

src/utility/copy.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@JelteF JelteF left a comment

Choose a reason for hiding this comment

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

Some final suggestions, but after that it's good to merge IMO.

@wuputah @mkaruza do any of you have some feedback on this. If not I'll squash some of the commits after my final feedback is addressed, and then merge this in a way that preserves the history nicely (specifically the initial copy of the PG15 ruleutils).

src/scan/postgres_scan.cpp Outdated Show resolved Hide resolved
src/utility/copy.cpp Outdated Show resolved Hide resolved
src/pgduckdb_hooks.cpp Outdated Show resolved Hide resolved
src/pgduckdb_hooks.cpp Outdated Show resolved Hide resolved
src/pgduckdb_hooks.cpp Outdated Show resolved Hide resolved
@wuputah
Copy link
Collaborator

wuputah commented Sep 18, 2024

do any of you have some feedback on this ...

Go for it. Tests pass so 👍

@JelteF
Copy link
Collaborator

JelteF commented Sep 30, 2024

@Leo-XM-Zeng sorry for the delay. We had some discussion in person about PG version support, given this is a young project and would like to move fast. The result of that discussion can be fonud here: #154 (comment)

tl;dr we'd like to merge this PG15 support.

Could you fix the merge conflict? Then I'll merge it after.

Thank you for all your work on this.

@Leo-XM-Zeng
Copy link
Contributor Author

@Leo-XM-Zeng sorry for the delay. We had some discussion in person about PG version support, given this is a young project and would like to move fast. The result of that discussion can be fonud here: #154 (comment)

tl;dr we'd like to merge this PG15 support.

Could you fix the merge conflict? Then I'll merge it after.

Thank you for all your work on this.

Ok, just a moment, please.

@JelteF JelteF added this to the 0.1.0 code complete milestone Sep 30, 2024
@JelteF JelteF added the enhancement New feature or request label Sep 30, 2024
@Leo-XM-Zeng
Copy link
Contributor Author

@JelteF oh, this error is due to unsupported syntax in the current psql15 version
image

@JelteF
Copy link
Collaborator

JelteF commented Sep 30, 2024

Alright, let's remove that test. We have enough other prepared statement tests in the pycheck tests.

@JelteF
Copy link
Collaborator

JelteF commented Sep 30, 2024

to be clear, not remove the whole basic.sql just the lines that use \bind

@Leo-XM-Zeng
Copy link
Contributor Author

to be clear, not remove the whole basic.sql just the lines that use \bind

understand

@Leo-XM-Zeng
Copy link
Contributor Author

to be clear, not remove the whole basic.sql just the lines that use \bind

understand

I'm sorry for the delay because I changed my computer and had some problems with the network

This vendors in the PG15 version of the ruleutils.c file from Postgres.
We've done the same already for PG16 and PG17 in e963297, but now in
preparation of PG15 support we also include the PG15 version.
This applies changes to pg_ruleutils_15.c that are identical to the ones
that we already made to the PG16 and PG17 versions of these files.

It also notably removes tests involving the psql \bind meta-command,
because those meta-commands are unsupported by PG15 its psql. This is
acceptable because we

Other than that this mainly adds a bunch of #if PG_VERSION_NUM >= 160000
preprocessor statements in places where APIs diverge between versions.
@JelteF
Copy link
Collaborator

JelteF commented Sep 30, 2024

@wuputah or @Y-- Could one of you approve this (depending on who's available first). I've now cleaned up the commits, and I'll "merge" this by pushing straight to master to keep git blame working well (just like I did when previously vendoring in the PG16 and PG17 ruleutils files).

@JelteF JelteF merged commit e889d9a into duckdb:main Sep 30, 2024
4 checks passed
JelteF added a commit that referenced this pull request Oct 1, 2024
The PG15 support that was introduced in #180 introduced a bunch of
warnings when compiling. To avoid getting numb to warnings, this adds
the -Werror to our CI builds, so we catch warnings before merging to main.

This also starts to ignore the register warning which was introduced by
PG15 support.
@JelteF JelteF mentioned this pull request Oct 1, 2024
JelteF added a commit that referenced this pull request Oct 1, 2024
The PG15 support that was introduced in #180 introduced a bunch of
warnings when compiling. To avoid getting numb to warnings, this adds
the -Werror to our CI builds, so we catch warnings before merging to
main.

This also starts to ignore the register warning which was introduced by
PG15 support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants