PG-210: Columns names should match upstream pg_stat_statements column names.
parent
20f3d8c047
commit
06b5e4c5fe
15
Makefile
15
Makefile
|
@ -18,30 +18,27 @@ 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 PostgreSQL 14,$(MAJOR)))
|
||||
ifneq (,$(findstring PostgreSQL14,$(MAJOR)))
|
||||
CP := $(shell cp pg_stat_monitor--1.0.13.dat pg_stat_monitor--1.0.sql)
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring PostgreSQL 13,$(MAJOR)))
|
||||
ifneq (,$(findstring PostgreSQL13,$(MAJOR)))
|
||||
CP := $(shell cp pg_stat_monitor--1.0.13.dat pg_stat_monitor--1.0.sql)
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring PostgreSQL 12,$(MAJOR)))
|
||||
ifneq (,$(findstring PostgreSQL12,$(MAJOR)))
|
||||
CP := $(shell cp pg_stat_monitor--1.0.dat pg_stat_monitor--1.0.sql)
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring PostgreSQL 11,$(MAJOR)))
|
||||
ifneq (,$(findstring PostgreSQL11,$(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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue