Skip to content

chore: support officially maintained pg versions (13 to 17)#4

Merged
EQuincerot merged 3 commits intomainfrom
support_other_pg_versions
Jun 17, 2025
Merged

chore: support officially maintained pg versions (13 to 17)#4
EQuincerot merged 3 commits intomainfrom
support_other_pg_versions

Conversation

@EQuincerot
Copy link
Member

@EQuincerot EQuincerot commented Jun 7, 2025

  • Upgrade pgrx to latest version
  • Support all pg versions that are officially maintained

@EQuincerot EQuincerot force-pushed the support_other_pg_versions branch from dfafe60 to d55a22a Compare June 7, 2025 12:43
@EQuincerot EQuincerot changed the title chore: support pg12 to pg16 chore: support pg12 to pg17 Jun 7, 2025
Base automatically changed from ci_improvement to main June 7, 2025 17:26
@EQuincerot EQuincerot force-pushed the support_other_pg_versions branch from 445059d to 63a2ffb Compare June 7, 2025 17:40
@EQuincerot EQuincerot changed the title chore: support pg12 to pg17 chore: support officially maintained pg versions (13 to 17) Jun 7, 2025

#[pg_guard]
pub extern "C" fn _PG_init() {
pub extern "C-unwind" fn _PG_init() {
Copy link
Member Author

Choose a reason for hiding this comment

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

Required when upgrading pgrx: see release notes

}
}
#[cfg(not(any(feature = "pg13", feature = "pg14")))]
CmdType::CMD_MERGE => {
Copy link
Member Author

Choose a reason for hiding this comment

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

#[cfg(not(any(feature = "pg13", feature = "pg14")))]
let table_oid = scanned_table(seq_scan.scan.scanrelid, rtables).unwrap();
#[cfg(any(feature = "pg13", feature = "pg14"))]
let table_oid = scanned_table(seq_scan.scanrelid, rtables).unwrap();
Copy link
Member Author

Choose a reason for hiding this comment

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

It seems the scanrelid was accessible in a different way before pg15.

Copy link
Contributor

Choose a reason for hiding this comment

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

that's, cool. I didn't know that you could write code for specific versions of pg with that macro.


[features]
default = ["pg15"]
default = ["pg17"]
Copy link
Member Author

Choose a reason for hiding this comment

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

Use the latest version as default, as this is the one which is closest to the future version.

- name: 🧪 Test - PG ${{ matrix.pg }}
run: pgrx-build-test
- name: 📎 Clippy - PG ${{ matrix.pg }}
if: ${{ matrix.pg == '17' }}
Copy link
Member Author

Choose a reason for hiding this comment

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

Only run for the latest version, we should not have big differences on other versions, and it should be enough.

@EQuincerot EQuincerot marked this pull request as ready for review June 7, 2025 17:47
@EQuincerot EQuincerot enabled auto-merge (squash) June 7, 2025 18:22
@EQuincerot EQuincerot disabled auto-merge June 17, 2025 09:11
Copy link
Contributor

@imediava-doctolib imediava-doctolib left a comment

Choose a reason for hiding this comment

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

LGTM !

Thanks for the work to make the extension work on different pg versions.

@EQuincerot EQuincerot merged commit b789e04 into main Jun 17, 2025
7 checks passed
@EQuincerot EQuincerot deleted the support_other_pg_versions branch June 17, 2025 09:19
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