File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -198,6 +198,7 @@ DECLARE
198198 v_limit_clause TEXT := ' ' ;
199199 v_where_clause TEXT := ' ' ;
200200 ctids TID[];
201+
201202BEGIN
202203 SELECT attname INTO v_attr
203204 FROM @extschema@.pathman_config WHERE partrel = p_relation;
@@ -244,7 +245,7 @@ BEGIN
244245 RETURN;
245246END
246247$$
247- LANGUAGE plpgsql STRICT
248+ LANGUAGE plpgsql
248249SET pg_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
708709RETURNS VOID AS ' pg_pathman' , ' validate_on_part_init_callback_pl'
709710LANGUAGE C STRICT;
710711
712+
711713/*
712- * Builds JSONB object containing new partition parameters and invoke the callback .
714+ * Invoke init_callback on RANGE partition.
713715 */
714716CREATE OR REPLACE FUNCTION @extschema@.invoke_on_partition_created_callback(
715717 parent_relid REGCLASS,
@@ -720,6 +722,9 @@ CREATE OR REPLACE FUNCTION @extschema@.invoke_on_partition_created_callback(
720722RETURNS VOID AS ' pg_pathman' , ' invoke_on_partition_created_callback'
721723LANGUAGE C;
722724
725+ /*
726+ * Invoke init_callback on HASH partition.
727+ */
723728CREATE OR REPLACE FUNCTION @extschema@.invoke_on_partition_created_callback(
724729 parent_relid REGCLASS,
725730 partition REGCLASS,
Original file line number Diff line number Diff 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+ else if (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 */
You can’t perform that action at this time.
0 commit comments