From 11c7aa12b9b91094447450894fa85be86a0e3098 Mon Sep 17 00:00:00 2001 From: Nikita Kirin Date: Tue, 31 Mar 2026 22:54:50 +0300 Subject: [PATCH 1/3] [PGPRO-17162] Remove unused variable Tags: pg_variables --- pg_variables.c | 1 - 1 file changed, 1 deletion(-) diff --git a/pg_variables.c b/pg_variables.c index c8ee939..e07395a 100644 --- a/pg_variables.c +++ b/pg_variables.c @@ -122,7 +122,6 @@ do { \ #endif /* PG_VERSION_NUM */ /* User controlled GUCs */ -bool convert_unknownoid_guc; bool convert_unknownoid; static HTAB *packagesHash = NULL; From 64a77ecf769ac5868a93231e83bdb71d1d347396 Mon Sep 17 00:00:00 2001 From: Nikita Kirin Date: Tue, 31 Mar 2026 22:56:43 +0300 Subject: [PATCH 2/3] [PGPRO-17162] Replace unknown type bits8 with standard uint8_t Tags: pg_variables --- pg_variables_record.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pg_variables_record.c b/pg_variables_record.c index e3567d1..080af36 100644 --- a/pg_variables_record.c +++ b/pg_variables_record.c @@ -390,7 +390,7 @@ get_record_key(Datum tuple, TupleDesc tupdesc, bool *isnull) { HeapTupleHeader th = (HeapTupleHeader) DatumGetPointer(tuple); bool hasnulls = th->t_infomask & HEAP_HASNULL; - bits8 *bp = th->t_bits; /* ptr to null bitmap in tuple */ + uint8_t *bp = th->t_bits; /* ptr to null bitmap in tuple */ char *tp; /* ptr to tuple data */ long off; /* offset in tuple data */ int keyatt = 0; From 040a3b8789148805905b77afd5016ae81a004fc1 Mon Sep 17 00:00:00 2001 From: Nikita Kirin Date: Tue, 31 Mar 2026 22:58:57 +0300 Subject: [PATCH 3/3] [PGPRO-17162] Add support for StaticAssertVariableIsOfTypeMacro from pg19 instead of AssertVariableIsOfTypeMacro Tags: pg_variables --- pg_variables.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pg_variables.h b/pg_variables.h index 6508e9f..abd5166 100644 --- a/pg_variables.h +++ b/pg_variables.h @@ -204,8 +204,14 @@ extern bool removeObject(TransObject *object, TransObjectType type); #define GetPackState(package) \ (((PackState *) GetActualState(package))) +#if PG_VERSION_NUM >= 190000 +#define GetName(object) \ + (StaticAssertVariableIsOfTypeMacro(object->transObject, TransObject), \ + object->transObject.name) +#else #define GetName(object) \ (AssertVariableIsOfTypeMacro(object->transObject, TransObject), \ object->transObject.name) +#endif #endif /* __PG_VARIABLES_H__ */