ossc-db / pg_hint_plan

Extension adding support for optimizer hints in PostgreSQL
Other
696 stars 103 forks source link

Fix extension scripts to support all possible upgrade paths #111

Closed michaelpq closed 1 year ago

michaelpq commented 1 year ago

This commit fixes and extends the extension SQL scripts in a few ways, to allow upgrades from the possible versions down to PG10

PostgreSQL allows, since v10, the maintenance of an extension using as base script the oldest version supported in combination of incremental scripts, and a whole set of scripts is added here. As origin versions may have a partial schema created for the hint table with partial definitions, the correct rules are enforced for each version.

Regression tests are added to cover all these upgrade paths.