PG17 compatibility: ruleutils (#7725)

PG17 compatibility - Part 2

https://github.com/citusdata/citus/pull/7699 was the first PG17
compatibility PR merged to main branch, which provided ONLY successful
Citus compilation with PG17.0.

This PR, consider it as Part 2, provides ruleutils changes for PG17.
Ruleutils changes is the first thing we should merge, after successful
build. It's the core for deparsing logic in Citus.

# Question: How do we add ruleutils changes?
- We add a new ruleutils file specific to PG17.
- We keep track of the changes in Postgres's ruleutils file from here
https://github.com/postgres/postgres/commits/REL_17_0/src/backend/utils/adt/ruleutils.c
- Per each commit in that history that belongs only to 17.0, we add the
relevant changes to static functions to our ruleutils file for PG17.
It's like a manual commit copying.

# Check the PR's commits for detailed steps
https://github.com/citusdata/citus/pull/7725/commits
pull/7746/head
Naisila Puka 2024-11-11 11:55:10 +03:00 committed by GitHub
parent da2624cee8
commit c0a5f5c78c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9924 additions and 0 deletions

1
.gitattributes vendored
View File

@ -29,6 +29,7 @@ src/backend/distributed/deparser/ruleutils_13.c -citus-style
src/backend/distributed/deparser/ruleutils_14.c -citus-style src/backend/distributed/deparser/ruleutils_14.c -citus-style
src/backend/distributed/deparser/ruleutils_15.c -citus-style src/backend/distributed/deparser/ruleutils_15.c -citus-style
src/backend/distributed/deparser/ruleutils_16.c -citus-style src/backend/distributed/deparser/ruleutils_16.c -citus-style
src/backend/distributed/deparser/ruleutils_17.c -citus-style
src/backend/distributed/commands/index_pg_source.c -citus-style src/backend/distributed/commands/index_pg_source.c -citus-style
src/include/distributed/citus_nodes.h -citus-style src/include/distributed/citus_nodes.h -citus-style

File diff suppressed because it is too large Load Diff

View File

@ -15,5 +15,6 @@
#define PG_VERSION_15 150000 #define PG_VERSION_15 150000
#define PG_VERSION_16 160000 #define PG_VERSION_16 160000
#define PG_VERSION_17 170000 #define PG_VERSION_17 170000
#define PG_VERSION_18 180000
#endif /* PG_VERSION_CONSTANTS */ #endif /* PG_VERSION_CONSTANTS */