Skip to content

Commit b0eab03

Browse files
committed
Merge branch 'rel_future_multilevel' into rel_future_update_node.
Remove update triggers.
2 parents b96b32e + 8467f5a commit b0eab03

19 files changed

+751
-787
lines changed

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ REGRESS = pathman_array_qual \
4747
pathman_rowmarks \
4848
pathman_runtime_nodes \
4949
pathman_update_node \
50-
pathman_update_trigger \
50+
pathman_subpartitions \
5151
pathman_utility_stmt
5252

53+
5354
EXTRA_REGRESS_OPTS=--temp-config=$(top_srcdir)/$(subdir)/conf.add
5455

5556
EXTRA_CLEAN = pg_pathman--$(EXTVERSION).sql ./isolation_output

expected/pathman_basic.out

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ PL/pgSQL function pathman.prepare_for_partitioning(regclass,text,boolean) line 9
1818
SQL statement "SELECT pathman.prepare_for_partitioning(parent_relid,
1919
expression,
2020
partition_data)"
21-
PL/pgSQL function pathman.create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line 3 at PERFORM
21+
PL/pgSQL function pathman.create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line 6 at PERFORM
2222
\set VERBOSITY terse
2323
ALTER TABLE test.hash_rel ALTER COLUMN value SET NOT NULL;
2424
SELECT pathman.create_hash_partitions('test.hash_rel', 'value', 3, partition_data:=false);
@@ -147,7 +147,7 @@ PL/pgSQL function pathman.prepare_for_partitioning(regclass,text,boolean) line 9
147147
SQL statement "SELECT pathman.prepare_for_partitioning(parent_relid,
148148
expression,
149149
partition_data)"
150-
PL/pgSQL function pathman.create_range_partitions(regclass,text,anyelement,interval,integer,boolean) line 12 at PERFORM
150+
PL/pgSQL function pathman.create_range_partitions(regclass,text,anyelement,interval,integer,boolean) line 13 at PERFORM
151151
\set VERBOSITY terse
152152
ALTER TABLE test.range_rel ALTER COLUMN dt SET NOT NULL;
153153
SELECT pathman.create_range_partitions('test.range_rel', 'dt', '2015-01-01'::DATE, '1 month'::INTERVAL, 2);
@@ -1227,6 +1227,7 @@ SELECT * FROM test.hash_rel WHERE id = 123;
12271227
/* Test replacing hash partition */
12281228
CREATE TABLE test.hash_rel_extern (LIKE test.hash_rel INCLUDING ALL);
12291229
SELECT pathman.replace_hash_partition('test.hash_rel_0', 'test.hash_rel_extern');
1230+
NOTICE: trigger "hash_rel_upd_trig" for relation "test.hash_rel_0" does not exist, skipping
12301231
replace_hash_partition
12311232
------------------------
12321233
test.hash_rel_extern
@@ -1280,6 +1281,7 @@ CREATE TABLE test.hash_rel_wrong(
12801281
id INTEGER NOT NULL,
12811282
value INTEGER);
12821283
SELECT pathman.replace_hash_partition('test.hash_rel_1', 'test.hash_rel_wrong');
1284+
NOTICE: trigger "hash_rel_upd_trig" for relation "test.hash_rel_1" does not exist, skipping
12831285
ERROR: column "value" in child table must be marked NOT NULL
12841286
EXPLAIN (COSTS OFF) SELECT * FROM test.hash_rel;
12851287
QUERY PLAN

expected/pathman_expressions.out

+8-8
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ PL/pgSQL function prepare_for_partitioning(regclass,text,boolean) line 9 at PERF
234234
SQL statement "SELECT public.prepare_for_partitioning(parent_relid,
235235
expression,
236236
partition_data)"
237-
PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line 3 at PERFORM
237+
PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line 6 at PERFORM
238238
/* Try using system attributes */
239239
SELECT create_hash_partitions('test_exprs.hash_rel', 'xmin', 4);
240240
ERROR: failed to analyze partitioning expression "xmin"
@@ -244,7 +244,7 @@ PL/pgSQL function prepare_for_partitioning(regclass,text,boolean) line 9 at PERF
244244
SQL statement "SELECT public.prepare_for_partitioning(parent_relid,
245245
expression,
246246
partition_data)"
247-
PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line 3 at PERFORM
247+
PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line 6 at PERFORM
248248
/* Try using subqueries */
249249
SELECT create_hash_partitions('test_exprs.hash_rel',
250250
'value, (select oid from pg_class limit 1)',
@@ -256,7 +256,7 @@ PL/pgSQL function prepare_for_partitioning(regclass,text,boolean) line 9 at PERF
256256
SQL statement "SELECT public.prepare_for_partitioning(parent_relid,
257257
expression,
258258
partition_data)"
259-
PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line 3 at PERFORM
259+
PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line 6 at PERFORM
260260
/* Try using mutable expression */
261261
SELECT create_hash_partitions('test_exprs.hash_rel', 'random()', 4);
262262
ERROR: failed to analyze partitioning expression "random()"
@@ -266,7 +266,7 @@ PL/pgSQL function prepare_for_partitioning(regclass,text,boolean) line 9 at PERF
266266
SQL statement "SELECT public.prepare_for_partitioning(parent_relid,
267267
expression,
268268
partition_data)"
269-
PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line 3 at PERFORM
269+
PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line 6 at PERFORM
270270
/* Try using broken parentheses */
271271
SELECT create_hash_partitions('test_exprs.hash_rel', 'value * value2))', 4);
272272
ERROR: failed to parse partitioning expression "value * value2))"
@@ -276,7 +276,7 @@ CONTEXT: PL/pgSQL function prepare_for_partitioning(regclass,text,boolean) line
276276
SQL statement "SELECT public.prepare_for_partitioning(parent_relid,
277277
expression,
278278
partition_data)"
279-
PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line 3 at PERFORM
279+
PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line 6 at PERFORM
280280
/* Try using missing columns */
281281
SELECT create_hash_partitions('test_exprs.hash_rel', 'value * value3', 4);
282282
ERROR: failed to analyze partitioning expression "value * value3"
@@ -287,7 +287,7 @@ CONTEXT: PL/pgSQL function prepare_for_partitioning(regclass,text,boolean) line
287287
SQL statement "SELECT public.prepare_for_partitioning(parent_relid,
288288
expression,
289289
partition_data)"
290-
PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line 3 at PERFORM
290+
PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line 6 at PERFORM
291291
/* Check that 'pathman_hooks_enabled' is true (1 partition in plan) */
292292
EXPLAIN (COSTS OFF) INSERT INTO test_exprs.canary_copy
293293
SELECT * FROM test_exprs.canary WHERE val = 1;
@@ -371,7 +371,7 @@ PL/pgSQL function prepare_for_partitioning(regclass,text,boolean) line 9 at PERF
371371
SQL statement "SELECT public.prepare_for_partitioning(parent_relid,
372372
expression,
373373
partition_data)"
374-
PL/pgSQL function create_range_partitions(regclass,text,anyelement,interval,integer,boolean) line 12 at PERFORM
374+
PL/pgSQL function create_range_partitions(regclass,text,anyelement,interval,integer,boolean) line 13 at PERFORM
375375
/* Try using mutable expression */
376376
SELECT create_range_partitions('test_exprs.range_rel', 'RANDOM()',
377377
'15 years'::INTERVAL, '1 year'::INTERVAL, 10);
@@ -382,7 +382,7 @@ PL/pgSQL function prepare_for_partitioning(regclass,text,boolean) line 9 at PERF
382382
SQL statement "SELECT public.prepare_for_partitioning(parent_relid,
383383
expression,
384384
partition_data)"
385-
PL/pgSQL function create_range_partitions(regclass,text,anyelement,interval,integer,boolean) line 12 at PERFORM
385+
PL/pgSQL function create_range_partitions(regclass,text,anyelement,interval,integer,boolean) line 13 at PERFORM
386386
/* Check that 'pathman_hooks_enabled' is true (1 partition in plan) */
387387
EXPLAIN (COSTS OFF) INSERT INTO test_exprs.canary_copy
388388
SELECT * FROM test_exprs.canary WHERE val = 1;

0 commit comments

Comments
 (0)