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

Commit86d609a

Browse files
committed
_partition_data_concurrent() should not be STRICT, fix ARGISNULL 'else if' checks in invoke_on_partition_created_callback()
1 parent1385218 commit86d609a

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

‎init.sql

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ DECLARE
198198
v_limit_clauseTEXT :='';
199199
v_where_clauseTEXT :='';
200200
ctidsTID[];
201+
201202
BEGIN
202203
SELECT attname INTO v_attr
203204
FROM @extschema@.pathman_configWHERE partrel= p_relation;
@@ -244,7 +245,7 @@ BEGIN
244245
RETURN;
245246
END
246247
$$
247-
LANGUAGE plpgsql STRICT
248+
LANGUAGE plpgsql
248249
SETpg_pathman.enable_partitionfilter=on;/* ensures that PartitionFilter is ON*/
249250

250251
/*
@@ -708,8 +709,9 @@ CREATE OR REPLACE FUNCTION @extschema@.validate_on_partition_created_callback(ca
708709
RETURNS VOIDAS'pg_pathman','validate_on_part_init_callback_pl'
709710
LANGUAGE C STRICT;
710711

712+
711713
/*
712-
*Builds JSONB object containing newpartition parameters and invoke the callback.
714+
*Invoke init_callback on RANGEpartition.
713715
*/
714716
CREATEOR REPLACE FUNCTION @extschema@.invoke_on_partition_created_callback(
715717
parent_relidREGCLASS,
@@ -720,6 +722,9 @@ CREATE OR REPLACE FUNCTION @extschema@.invoke_on_partition_created_callback(
720722
RETURNS VOIDAS'pg_pathman','invoke_on_partition_created_callback'
721723
LANGUAGE C;
722724

725+
/*
726+
* Invoke init_callback on HASH partition.
727+
*/
723728
CREATEOR REPLACE FUNCTION @extschema@.invoke_on_partition_created_callback(
724729
parent_relidREGCLASS,
725730
partitionREGCLASS,

‎src/pl_funcs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ invoke_on_partition_created_callback(PG_FUNCTION_ARGS)
844844
part_type=PT_HASH;
845845

846846
/* Either RANGE_START or RANGE_END is missing */
847-
if (PG_ARGISNULL(ARG_RANGE_START)||PG_ARGISNULL(ARG_RANGE_START))
847+
elseif (PG_ARGISNULL(ARG_RANGE_START)||PG_ARGISNULL(ARG_RANGE_START))
848848
elog(ERROR,"both boundaries must be provided for RANGE partition");
849849

850850
/* Both RANGE_START & RANGE_END are provided */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp