Summary:
ae8c8b3080e7cab45a991ea772602ba51c794ec2/D42374 imported the PG feature related to setting stats, but the code was not included in the build.
This change adds `pg_clear_relation_stats`, `pg_restore_relation_stats`, `pg_clear_attribute_stats` and `pg_restore_attribute_stats` SQL functions to `pg_proc.dat` and include `attribute_stats.c`, `relation_stats.c` and `stat_utils.c` in the build.
- PG commit 99f8f3fbbc8f743290844e8c676d39dad11c5d5d adds `relallfrozen`. Not all parts of this commit were ported, and this is not required in yb, so any code related to `relallfrozen` has been removed .
- `construct_array_builtin` function has also been imported over since its a simple change.
- `YBIncrementDdlNestingLevel` and `YBDecrementDdlNestingLevel` calls have been included in appropriate places.
- `ErrorSaveContext` does not exist in pg15 so the usage of this has been replaced with pg15 equivalent calls.
- `object_ownercheck` does not exist in pg15, so it is replaced with `pg_database_ownercheck`.
- `ACL_MAINTAIN` does not exist in pg15 so replace this with `ACL_UPDATE`.
- `CatalogTupleDelete` was also changed to handle pg15 behavior.
Fixes #26335
Jira: DB-15681
Test Plan: TestPgRegressPgStatsImportExt
Reviewers: telgersma, #db-approvers
Reviewed By: telgersma
Subscribers: svc_phabricator, jason, ybase, yql
Differential Revision: https://phorge.dev.yugabyte.com/D42224