Skip to content

Commit f463e0e

Browse files
committed
Add some quotes to SPI call in partition creation.
1 parent 30d0706 commit f463e0e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/partition_creation.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -605,15 +605,15 @@ spawn_partitions_val(Oid parent_relid, /* parent's Oid */
605605
/* Construct call to create_single_range_partition() */
606606
create_sql = psprintf(
607607
"select %s.create_single_range_partition('%s.%s', '%s'::%s, '%s'::%s, '%s.%s')",
608-
get_namespace_name(get_pathman_schema()),
609-
parent_nsp_name,
610-
get_rel_name(parent_relid),
608+
quote_identifier(get_namespace_name(get_pathman_schema())),
609+
quote_identifier(parent_nsp_name),
610+
quote_identifier(get_rel_name(parent_relid)),
611611
IsInfinite(&bounds[0]) ? "NULL" : datum_to_cstring(bounds[0].value, range_bound_type),
612612
typname,
613613
IsInfinite(&bounds[1]) ? "NULL" : datum_to_cstring(bounds[1].value, range_bound_type),
614614
typname,
615-
parent_nsp_name,
616-
partition_name
615+
quote_identifier(parent_nsp_name),
616+
quote_identifier(partition_name)
617617
);
618618

619619
/* ...and call it. */

0 commit comments

Comments
 (0)