Skip to content

Commit b718cbd

Browse files
committed
migration script from 1.2 to 1.3
1 parent 369b49d commit b718cbd

File tree

4 files changed

+916
-53
lines changed

4 files changed

+916
-53
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ regression.out
99
*.gcda
1010
*.gcno
1111
*.gcov
12-
pg_pathman--*.sql
12+
pg_pathman--1.3.sql

init.sql

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ LANGUAGE plpgsql;
251251
CREATE OR REPLACE FUNCTION @extschema@.show_partition_list()
252252
RETURNS TABLE (
253253
parent REGCLASS,
254-
"partition" REGCLASS,
254+
partition REGCLASS,
255255
parttype INT4,
256256
partattr TEXT,
257257
range_min TEXT,
@@ -643,21 +643,21 @@ SET pg_pathman.enable_partitionfilter = off; /* ensures that PartitionFilter is
643643
*/
644644
CREATE OR REPLACE FUNCTION @extschema@.copy_foreign_keys(
645645
parent_relid REGCLASS,
646-
partition_relid REGCLASS)
646+
partition REGCLASS)
647647
RETURNS VOID AS
648648
$$
649649
DECLARE
650650
rec RECORD;
651651

652652
BEGIN
653653
PERFORM @extschema@.validate_relname(parent_relid);
654-
PERFORM @extschema@.validate_relname(partition_relid);
654+
PERFORM @extschema@.validate_relname(partition);
655655

656656
FOR rec IN (SELECT oid as conid FROM pg_catalog.pg_constraint
657657
WHERE conrelid = parent_relid AND contype = 'f')
658658
LOOP
659659
EXECUTE format('ALTER TABLE %s ADD %s',
660-
partition_relid::TEXT,
660+
partition::TEXT,
661661
pg_catalog.pg_get_constraintdef(rec.conid));
662662
END LOOP;
663663
END
@@ -880,7 +880,7 @@ LANGUAGE C STRICT;
880880
*/
881881
CREATE OR REPLACE FUNCTION @extschema@.invoke_on_partition_created_callback(
882882
parent_relid REGCLASS,
883-
"partition" REGCLASS,
883+
partition REGCLASS,
884884
init_callback REGPROCEDURE,
885885
start_value ANYELEMENT,
886886
end_value ANYELEMENT)
@@ -892,7 +892,7 @@ LANGUAGE C;
892892
*/
893893
CREATE OR REPLACE FUNCTION @extschema@.invoke_on_partition_created_callback(
894894
parent_relid REGCLASS,
895-
"partition" REGCLASS,
895+
partition REGCLASS,
896896
init_callback REGPROCEDURE)
897897
RETURNS VOID AS 'pg_pathman', 'invoke_on_partition_created_callback'
898898
LANGUAGE C;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy