PG-210: Columns names should match upstream pg_stat_statements column names.

pull/128/head
Ibrar Ahmed 2021-11-10 19:30:32 +00:00
parent 20f3d8c047
commit 06b5e4c5fe
2 changed files with 7 additions and 10 deletions

View File

@ -18,14 +18,10 @@ REGRESS = basic version guc counters relations database top_query application_na
# NO_INSTALLCHECK = 1
ifdef USE_PGXS
PG_CONFIG = pg_config
PG_VERSION := $(shell pg_config --version)
PG_VERSION := $(shell pg_config --version | awk {'print $$1 $$2'})
MAJOR := $(shell echo $(PG_VERSION) | sed -e 's/\.[^./]*$$//')
all:
echo $(MAJOR)
ifneq (,$(findstring PostgreSQL14,$(MAJOR)))
CP := $(shell cp pg_stat_monitor--1.0.13.dat pg_stat_monitor--1.0.sql)
endif
@ -42,6 +38,7 @@ ifneq (,$(findstring PostgreSQL 11,$(MAJOR)))
CP := $(shell cp pg_stat_monitor--1.0.dat pg_stat_monitor--1.0.sql)
endif
ifdef USE_PGXS
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else

View File

@ -1779,7 +1779,7 @@ pg_stat_monitor_internal(FunctionCallInfo fcinfo,
if (enc != query_txt)
pfree(enc);
/* plan at column number 7 */
if (planid && tmp.planinfo.plan_text)
if (planid && strlen(tmp.planinfo.plan_text) > 0)
values[i++] = CStringGetTextDatum(tmp.planinfo.plan_text);
else
nulls[i++] = true;