@@ -16,18 +16,28 @@ SELECT COUNT(*) FROM test_exprs.hash_rel;
16
16
5
17
17
(1 row)
18
18
19
+ SELECT create_hash_partitions('test_exprs.hash_rel', 'random()', 4);
20
+ ERROR: functions in partitioning expression must be marked IMMUTABLE
19
21
\set VERBOSITY default
20
22
SELECT create_hash_partitions('test_exprs.hash_rel', 'value * value2))', 4);
21
23
ERROR: partitioning expression parse error
22
24
DETAIL: syntax error at or near ")"
23
- QUERY: SELECT public.add_to_pathman_config(parent_relid, expression)
24
- CONTEXT: PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line 9 at PERFORM
25
+ QUERY: SELECT public.validate_expression(parent_relid, expression)
26
+ CONTEXT: PL/pgSQL function prepare_for_partitioning(regclass,text,boolean) line 9 at PERFORM
27
+ SQL statement "SELECT public.prepare_for_partitioning(parent_relid,
28
+ expression,
29
+ partition_data)"
30
+ PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line 4 at PERFORM
25
31
SELECT create_hash_partitions('test_exprs.hash_rel', 'value * value3', 4);
26
32
ERROR: partitioning expression analyze error
27
33
DETAIL: column "value3" does not exist
28
34
HINT: Perhaps you meant to reference the column "hash_rel.value" or the column "hash_rel.value2".
29
- QUERY: SELECT public.add_to_pathman_config(parent_relid, expression)
30
- CONTEXT: PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line 9 at PERFORM
35
+ QUERY: SELECT public.validate_expression(parent_relid, expression)
36
+ CONTEXT: PL/pgSQL function prepare_for_partitioning(regclass,text,boolean) line 9 at PERFORM
37
+ SQL statement "SELECT public.prepare_for_partitioning(parent_relid,
38
+ expression,
39
+ partition_data)"
40
+ PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line 4 at PERFORM
31
41
\set VERBOSITY terse
32
42
SELECT create_hash_partitions('test_exprs.hash_rel', 'value * value2', 4);
33
43
create_hash_partitions
@@ -88,7 +98,7 @@ CREATE TABLE test_exprs.range_rel (id SERIAL PRIMARY KEY, dt TIMESTAMP, txt TEXT
88
98
INSERT INTO test_exprs.range_rel (dt, txt)
89
99
SELECT g, md5(g::TEXT) FROM generate_series('2015-01-01', '2020-04-30', '1 month'::interval) as g;
90
100
SELECT create_range_partitions('test_exprs.range_rel', 'RANDOM()', '15 years'::INTERVAL, '1 year'::INTERVAL, 10);
91
- ERROR: start value is less than min value of "random()"
101
+ ERROR: functions in partitioning expression must be marked IMMUTABLE
92
102
SELECT create_range_partitions('test_exprs.range_rel', 'AGE(dt, ''2000-01-01''::DATE)',
93
103
'15 years'::INTERVAL, '1 year'::INTERVAL, 10);
94
104
create_range_partitions
0 commit comments