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 support for PostgreSQL 12 #86

Merged
merged 1 commit into from
Oct 24, 2019

Conversation

intgr
Copy link
Contributor

@intgr intgr commented Oct 6, 2019

PostgreSQL 12 brings changes to FunctionCallInfoData (the way arguments
are passed to functions) and the FDW API.

This pull request:

  • Implements support for the new call interface (keeping backwards compatibility).
  • Disables FDW support in PostgreSQL 12.

Upstream commit:
postgres/postgres@a9c35cf


fixes: #95

pg-extend/src/lib.rs Outdated Show resolved Hide resolved
@intgr intgr force-pushed the postgresql-12-support branch from 40f57f5 to 031ddce Compare October 6, 2019 18:43
integration-tests/tests/fdw.rs Outdated Show resolved Hide resolved
@intgr intgr force-pushed the postgresql-12-support branch 3 times, most recently from 7b8170a to b128904 Compare October 6, 2019 19:53
Copy link
Owner

@bluejekyll bluejekyll left a comment

Choose a reason for hiding this comment

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

This is looking good, are there any other changes needed? See my question about the necessity of the NullableDatum with Option<Datum> instead?

Cargo.toml Outdated Show resolved Hide resolved
pg-extend/Cargo.toml Show resolved Hide resolved
pg-extend/src/lib.rs Outdated Show resolved Hide resolved
@intgr
Copy link
Contributor Author

intgr commented Oct 9, 2019

This is what I came up with. Is this what you had in mind?

I also tried to make get_args() to return iterator of PgDatums. That would seem nicer. I added a MemoryContext argument but I couldn't make the lifetimes work. Too tired to think now :)

pg-extend/src/pg_datum.rs Show resolved Hide resolved
pg-extend/src/pg_fdw.rs Outdated Show resolved Hide resolved
@intgr intgr force-pushed the postgresql-12-support branch 2 times, most recently from 3ac66ae to bf1eab7 Compare October 9, 2019 23:51
Copy link
Owner

@bluejekyll bluejekyll left a comment

Choose a reason for hiding this comment

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

We don't want to add pg-extend/src/postgres.rs to the repo, do we?

cookbook Outdated Show resolved Hide resolved
Copy link
Owner

@bluejekyll bluejekyll left a comment

Choose a reason for hiding this comment

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

This is looking really good. I didn’t see the memory context issue that you mentioned. If it’s still giving you trouble ping me on discord.

That’s basically there to keep Rust’s lifetimes in sync with the pg memory contexts.

pg-extend/src/lib.rs Show resolved Hide resolved
@intgr intgr force-pushed the postgresql-12-support branch from bf1eab7 to f6f76b1 Compare October 10, 2019 17:47
@intgr intgr force-pushed the postgresql-12-support branch 3 times, most recently from 4ce465b to 96b692f Compare October 23, 2019 21:31
PostgreSQL 12 brings changes to FunctionCallInfoData (the way arguments
are passed to functions).

Upstream commit:
postgres/postgres@a9c35cf
@intgr intgr force-pushed the postgresql-12-support branch from 96b692f to 3c625d8 Compare October 23, 2019 21:36
@intgr intgr changed the title WIP: Add support for PostgreSQL 12 (except FDW) Add support for PostgreSQL 12 Oct 23, 2019
Copy link
Owner

@bluejekyll bluejekyll left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@bluejekyll
Copy link
Owner

@intgr if you think this is ready, it looks good to merge, I’ll do that in a little bit.

@bluejekyll bluejekyll merged commit f29f864 into bluejekyll:master Oct 24, 2019
@bluejekyll
Copy link
Owner

Thanks for this, @intgr !

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.

Not support postgres-12?
3 participants