diff --git a/Makefile b/Makefile index c4f84b33..6e45f2b7 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,14 @@ MODULE_big = diskquota EXTENSION = diskquota -DATA = diskquota--1.0.sql +EXTENSION_VERSION = 1.0.3 + +DATA = \ + diskquota--1.0.sql \ + diskquota--1.0--1.0.3.sql \ + +DATA_built = diskquota--$(EXTENSION_VERSION).sql + SRCDIR = ./ FILES = diskquota.c enforcement.c quotamodel.c gp_activetable.c diskquota_utility.c OBJS = diskquota.o enforcement.o quotamodel.o gp_activetable.o diskquota_utility.o @@ -18,3 +25,6 @@ REGRESS_OPTS = --schedule=diskquota_schedule --init-file=init_file endif PGXS := $(shell pg_config --pgxs) include $(PGXS) + +diskquota--$(EXTENSION_VERSION).sql: + cat $(DATA) > diskquota--$(EXTENSION_VERSION).sql diff --git a/diskquota--1.0--1.0.3.sql b/diskquota--1.0--1.0.3.sql new file mode 100644 index 00000000..0f1f3b82 --- /dev/null +++ b/diskquota--1.0--1.0.3.sql @@ -0,0 +1,8 @@ +\echo use "alter extension diskquota update to '1.0.3'" to load this file. \quit + +SELECT gp_segment_id, pg_catalog.pg_extension_config_dump('diskquota.quota_config', '') from gp_dist_random('gp_id'); + +CREATE FUNCTION diskquota.update_diskquota_db_list(oid, int4) +RETURNS void STRICT +AS 'MODULE_PATHNAME' +LANGUAGE C; diff --git a/diskquota--1.0.sql b/diskquota--1.0.sql index af22a2ff..69297962 100644 --- a/diskquota--1.0.sql +++ b/diskquota--1.0.sql @@ -9,7 +9,6 @@ CREATE SCHEMA diskquota; CREATE TABLE diskquota.quota_config (targetOid oid, quotatype int, quotalimitMB int8, PRIMARY KEY(targetOid, quotatype)); SELECT pg_catalog.pg_extension_config_dump('diskquota.quota_config', ''); -SELECT gp_segment_id, pg_catalog.pg_extension_config_dump('diskquota.quota_config', '') from gp_dist_random('gp_id'); CREATE FUNCTION diskquota.set_schema_quota(text, text) RETURNS void STRICT @@ -21,11 +20,6 @@ RETURNS void STRICT AS 'MODULE_PATHNAME' LANGUAGE C; -CREATE FUNCTION diskquota.update_diskquota_db_list(oid, int4) -RETURNS void STRICT -AS 'MODULE_PATHNAME' -LANGUAGE C; - CREATE TABLE diskquota.table_size (tableid oid, size bigint, PRIMARY KEY(tableid)); CREATE TABLE diskquota.state (state int, PRIMARY KEY(state)); diff --git a/diskquota.control b/diskquota.control index 6c25e7cd..58693a2b 100644 --- a/diskquota.control +++ b/diskquota.control @@ -1,5 +1,5 @@ # diskquota extension comment = 'Disk Quota Main Program' -default_version = '1.0' +default_version = '1.0.3' module_pathname = '$libdir/diskquota' relocatable = true