diff --git a/pg_wait_sampling.c b/pg_wait_sampling.c index 4b7e030..32f2bdd 100644 --- a/pg_wait_sampling.c +++ b/pg_wait_sampling.c @@ -524,6 +524,9 @@ pg_wait_sampling_get_current(PG_FUNCTION_ARGS) TEXTOID, -1, 0); TupleDescInitEntry(tupdesc, (AttrNumber) 4, "queryid", INT8OID, -1, 0); +#if PG_VERSION_NUM >= 190000 + TupleDescFinalize(tupdesc); +#endif funcctx->tuple_desc = BlessTupleDesc(tupdesc); @@ -757,6 +760,9 @@ pg_wait_sampling_get_profile(PG_FUNCTION_ARGS) INT8OID, -1, 0); TupleDescInitEntry(tupdesc, (AttrNumber) 5, "count", INT8OID, -1, 0); +#if PG_VERSION_NUM >= 190000 + TupleDescFinalize(tupdesc); +#endif funcctx->tuple_desc = BlessTupleDesc(tupdesc); MemoryContextSwitchTo(oldcontext); @@ -882,6 +888,9 @@ pg_wait_sampling_get_history(PG_FUNCTION_ARGS) TEXTOID, -1, 0); TupleDescInitEntry(tupdesc, (AttrNumber) 5, "queryid", INT8OID, -1, 0); +#if PG_VERSION_NUM >= 190000 + TupleDescFinalize(tupdesc); +#endif funcctx->tuple_desc = BlessTupleDesc(tupdesc); MemoryContextSwitchTo(oldcontext);