Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0c4108e

Browse files
committed
Remove lowering for expression in create_hash_partitions
1 parentea8054a commit0c4108e

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

‎expected/pathman_basic.out

Lines changed: 1 addition & 1 deletion
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[]) line4 at PERFORM
21+
PL/pgSQL function pathman.create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line3 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);

‎expected/pathman_expressions.out

Lines changed: 6 additions & 6 deletions
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[]) line4 at PERFORM
237+
PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line3 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[]) line4 at PERFORM
247+
PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line3 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[]) line4 at PERFORM
259+
PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line3 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[]) line4 at PERFORM
269+
PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line3 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[]) line4 at PERFORM
279+
PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line3 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[]) line4 at PERFORM
290+
PL/pgSQL function create_hash_partitions(regclass,text,integer,boolean,text[],text[]) line3 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;

‎hash.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ CREATE OR REPLACE FUNCTION @extschema@.create_hash_partitions(
2020
tablespacesTEXT[] DEFAULTNULL)
2121
RETURNSINTEGERAS $$
2222
BEGIN
23-
expression :=lower(expression);
2423
PERFORM @extschema@.prepare_for_partitioning(parent_relid,
2524
expression,
2625
partition_data);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp