fix DETACH PARTITION with loss %I

pull/7540/head
icefairy 2024-02-28 10:48:24 +08:00
parent 5b10d31959
commit 4d7e16d4d8
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ BEGIN
FOR r IN EXECUTE older_partitions_query USING table_name, older_than FOR r IN EXECUTE older_partitions_query USING table_name, older_than
LOOP LOOP
RAISE NOTICE 'dropping % with start time % and end time % using DETACH PARTITION partition_name AND THEN DROP IT. ', r.partition, r.from_value, r.to_value; RAISE NOTICE 'dropping % with start time % and end time % using DETACH PARTITION partition_name AND THEN DROP IT. ', r.partition, r.from_value, r.to_value;
EXECUTE format('DETACH PARTITION ', r.partition); EXECUTE format('DETACH PARTITION %I', r.partition);
EXECUTE format('DROP TABLE %I.%I', r.schema_name, r.table_name); EXECUTE format('DROP TABLE %I.%I', r.schema_name, r.table_name);
END LOOP; END LOOP;
END; END;