Skip to content

Validate INCLUDE compatibility for index creation in PostgreSQL #390#391

Merged
azygis merged 8 commits intohangfire-postgres:masterfrom
miguelaristy:validate-include-compatibility
Apr 2, 2025
Merged

Validate INCLUDE compatibility for index creation in PostgreSQL #390#391
azygis merged 8 commits intohangfire-postgres:masterfrom
miguelaristy:validate-include-compatibility

Conversation

@miguelaristy
Copy link
Contributor

Runtime : .Net9.0
Postgres Version : postgres:10 alpine

Error:
In PostgreSQL 10, Hangfire.PostgreSql encountered an error during index creation: "syntax error at or near 'INCLUDE'." This happened because the INCLUDE clause is not supported in this version, causing the migration to fail.

Solution: To resolve this, the script now dynamically checks for INCLUDE compatibility. If supported, the index is created with INCLUDE; otherwise, a fallback version without INCLUDE is used. This ensures compatibility with PostgreSQL and later versions.

@azygis
Copy link
Collaborator

azygis commented Mar 27, 2025

Thanks for the PR!

The raw string literals in CI is weird. It is not related to your PR, it's complaining about C# side which just worked fine (and actually still works). Something's wrong with GH runner.

@azygis azygis merged commit 0489856 into hangfire-postgres:master Apr 2, 2025
2 checks passed
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