BEGIN;

CREATE TABLE b (
	j int,
	v double precision)
PARTITION BY RANGE(j);

CREATE TABLE b_1 PARTITION OF b FOR VALUES FROM (0) TO (16);
CREATE TABLE b_2 PARTITION OF b FOR VALUES FROM (16) TO (32);

CREATE TABLE c (
	k int,
	v double precision)
PARTITION BY RANGE(k);

CREATE TABLE c_1 PARTITION OF c FOR VALUES FROM (0) TO (16);
CREATE TABLE c_2 PARTITION OF c FOR VALUES FROM (16) TO (32);

INSERT INTO b(j, v)
SELECT n, random()
FROM generate_series(0, 31) AS s(n);

INSERT INTO c(k, v)
SELECT n, random()
FROM generate_series(0, 31) AS s(n);

COMMIT;

ANALYZE;
