PG-210: Columns names should match upstream pg_stat_statements column names.
parent
20f3d8c047
commit
06b5e4c5fe
7
Makefile
7
Makefile
|
@ -18,14 +18,10 @@ REGRESS = basic version guc counters relations database top_query application_na
|
||||||
# NO_INSTALLCHECK = 1
|
# NO_INSTALLCHECK = 1
|
||||||
|
|
||||||
|
|
||||||
ifdef USE_PGXS
|
|
||||||
PG_CONFIG = pg_config
|
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/\.[^./]*$$//')
|
MAJOR := $(shell echo $(PG_VERSION) | sed -e 's/\.[^./]*$$//')
|
||||||
|
|
||||||
all:
|
|
||||||
echo $(MAJOR)
|
|
||||||
|
|
||||||
ifneq (,$(findstring PostgreSQL14,$(MAJOR)))
|
ifneq (,$(findstring PostgreSQL14,$(MAJOR)))
|
||||||
CP := $(shell cp pg_stat_monitor--1.0.13.dat pg_stat_monitor--1.0.sql)
|
CP := $(shell cp pg_stat_monitor--1.0.13.dat pg_stat_monitor--1.0.sql)
|
||||||
endif
|
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)
|
CP := $(shell cp pg_stat_monitor--1.0.dat pg_stat_monitor--1.0.sql)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifdef USE_PGXS
|
||||||
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
||||||
include $(PGXS)
|
include $(PGXS)
|
||||||
else
|
else
|
||||||
|
|
|
@ -1779,7 +1779,7 @@ pg_stat_monitor_internal(FunctionCallInfo fcinfo,
|
||||||
if (enc != query_txt)
|
if (enc != query_txt)
|
||||||
pfree(enc);
|
pfree(enc);
|
||||||
/* plan at column number 7 */
|
/* 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);
|
values[i++] = CStringGetTextDatum(tmp.planinfo.plan_text);
|
||||||
else
|
else
|
||||||
nulls[i++] = true;
|
nulls[i++] = true;
|
||||||
|
|
Loading…
Reference in New Issue