Merge pull request #831 from citusdata/ultimate_citus_improvement

Change logicalrelid type to regclass
pull/783/head
Marco Slot 2016-10-03 20:34:57 +02:00 committed by GitHub
commit e6ecbc2063
7 changed files with 17 additions and 7 deletions

View File

@ -10,6 +10,6 @@
/tmp_check*
# ignore latest install file
citus--5.0.sql
citus--5.?-*.sql
!citus--5.?-*--5.?-*.sql
citus--?.?.sql
citus--?.?-*.sql
!citus--?.?-*--?.?-*.sql

View File

@ -7,7 +7,8 @@ MODULE_big = citus
EXTENSION = citus
EXTVERSIONS = 5.0 5.0-1 5.0-2 \
5.1-1 5.1-2 5.1-3 5.1-4 5.1-5 5.1-6 5.1-7 5.1-8 \
5.2-1 5.2-2 5.2-3 5.2-4
5.2-1 5.2-2 5.2-3 5.2-4 \
6.0-1
# All citus--*.sql files in the source directory
DATA = $(patsubst $(citus_abs_srcdir)/%.sql,%.sql,$(wildcard $(citus_abs_srcdir)/$(EXTENSION)--*--*.sql))
@ -57,6 +58,8 @@ $(EXTENSION)--5.2-3.sql: $(EXTENSION)--5.2-2.sql $(EXTENSION)--5.2-2--5.2-3.sql
cat $^ > $@
$(EXTENSION)--5.2-4.sql: $(EXTENSION)--5.2-3.sql $(EXTENSION)--5.2-3--5.2-4.sql
cat $^ > $@
$(EXTENSION)--6.0-1.sql: $(EXTENSION)--5.2-4.sql $(EXTENSION)--5.2-4--6.0-1.sql
cat $^ > $@
NO_PGXS = 1

View File

@ -0,0 +1,5 @@
/* citus--5.2-4--6.0-1.sql */
/* change logicalrelid type to regclass to allow implicit casts to text */
ALTER TABLE pg_catalog.pg_dist_partition ALTER COLUMN logicalrelid TYPE regclass;
ALTER TABLE pg_catalog.pg_dist_shard ALTER COLUMN logicalrelid TYPE regclass;

View File

@ -1,6 +1,6 @@
# Citus extension
comment = 'Citus distributed database'
default_version = '5.2-4'
default_version = '6.0-1'
module_pathname = '$libdir/citus'
relocatable = false
schema = pg_catalog

View File

@ -29,7 +29,7 @@ CREATE TYPE citus.distribution_type AS ENUM (
* Citus tables & corresponding indexes
*****************************************************************************/
CREATE TABLE citus.pg_dist_partition(
logicalrelid Oid NOT NULL,
logicalrelid Oid NOT NULL, /* type changed to regclass as of version 6.0-1 */
partmethod "char" NOT NULL,
partkey text NOT NULL
);
@ -39,7 +39,7 @@ ON citus.pg_dist_partition using btree(logicalrelid);
ALTER TABLE citus.pg_dist_partition SET SCHEMA pg_catalog;
CREATE TABLE citus.pg_dist_shard(
logicalrelid oid NOT NULL,
logicalrelid oid NOT NULL, /* type changed to regclass as of version 6.0-1 */
shardid int8 NOT NULL,
shardstorage "char" NOT NULL,
shardalias text,

View File

@ -26,6 +26,7 @@ ALTER EXTENSION citus UPDATE TO '5.2-1';
ALTER EXTENSION citus UPDATE TO '5.2-2';
ALTER EXTENSION citus UPDATE TO '5.2-3';
ALTER EXTENSION citus UPDATE TO '5.2-4';
ALTER EXTENSION citus UPDATE TO '6.0-1';
-- drop extension an re-create in newest version
DROP EXTENSION citus;
\c

View File

@ -31,6 +31,7 @@ ALTER EXTENSION citus UPDATE TO '5.2-1';
ALTER EXTENSION citus UPDATE TO '5.2-2';
ALTER EXTENSION citus UPDATE TO '5.2-3';
ALTER EXTENSION citus UPDATE TO '5.2-4';
ALTER EXTENSION citus UPDATE TO '6.0-1';
-- drop extension an re-create in newest version
DROP EXTENSION citus;