Skip to content

Extract PostgreSQL version constants#181

Merged
teoljungberg merged 2 commits intomasterfrom
extract-postgres-version-constants
Dec 11, 2025
Merged

Extract PostgreSQL version constants#181
teoljungberg merged 2 commits intomasterfrom
extract-postgres-version-constants

Conversation

@teoljungberg
Copy link
Owner

@teoljungberg teoljungberg commented Oct 31, 2025

  • Extract magic number into a structured constant
  • Add documentation with links to PostgreSQL release notes
  • Add comprehensive tests for version checking

This refactoring improves code readability and makes it easier to add
support for future PostgreSQL versions.

- Extract magic number 10_00_00 into POSTGRES_VERSIONS constant hash
- Add documentation with links to PostgreSQL release notes
- Extract server_version private method for better testability
- Add comprehensive tests for version checking (9.5, 9.6, 10.0, 11.0)

This refactoring improves code readability and makes it easier to add
support for future PostgreSQL versions.

References:
- https://www.postgresql.org/docs/10/release-10.html
- https://www.postgresql.org/docs/11/release-11.html
@teoljungberg teoljungberg mentioned this pull request Oct 31, 2025
@teoljungberg teoljungberg merged commit a361d75 into master Dec 11, 2025
9 checks passed
@teoljungberg teoljungberg deleted the extract-postgres-version-constants branch December 11, 2025 09:12
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