diff --git a/.circleci/config.yml b/.circleci/config.yml index 674280958..d76688ae3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,19 +6,19 @@ orbs: parameters: image_suffix: type: string - default: '-v186a1be' + default: '-vc4b1573' pg13_version: type: string - default: '13.8' + default: '13.10' pg14_version: type: string - default: '14.5' + default: '14.7' pg15_version: type: string - default: '15.0' + default: '15.2' upgrade_pg_versions: type: string - default: '13.8-14.5-15.0' + default: '13.10-14.7-15.2' style_checker_tools_version: type: string default: '0.8.18' diff --git a/src/include/pg_version_compat.h b/src/include/pg_version_compat.h index fcb857c41..eb81bca43 100644 --- a/src/include/pg_version_compat.h +++ b/src/include/pg_version_compat.h @@ -55,6 +55,14 @@ pg_strtoint64(char *s) } +/* + * RelationGetSmgr got backported in 13.10 and 14.7 so redefining it for any + * version higher causes compilation errors due to redefining of the function. + * We want to use it in all versions. So we backport it ourselves in earlier + * versions, and rely on the Postgres provided version in the later versions. + */ +#if PG_VERSION_NUM >= PG_VERSION_13 && PG_VERSION_NUM < 130010 \ + || PG_VERSION_NUM >= PG_VERSION_14 && PG_VERSION_NUM < 140007 static inline SMgrRelation RelationGetSmgr(Relation rel) { @@ -66,6 +74,9 @@ RelationGetSmgr(Relation rel) } +#endif + + #define CREATE_SEQUENCE_COMMAND \ "CREATE SEQUENCE IF NOT EXISTS %s AS %s INCREMENT BY " INT64_FORMAT \ " MINVALUE " INT64_FORMAT " MAXVALUE " INT64_FORMAT \