File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 69
69
PERFORM @extschema@.partition_data(parent_relid);
70
70
71
71
RETURN partitions_count;
72
+
73
+ EXCEPTION WHEN others THEN
74
+ RAISE EXCEPTION ' %' , SQLERRM;
72
75
END
73
76
$$ LANGUAGE plpgsql
74
77
SET client_min_messages = WARNING;
Original file line number Diff line number Diff line change 88
88
DECLARE
89
89
v_rec RECORD;
90
90
is_referenced BOOLEAN ;
91
+ rel_persistence CHAR ;
91
92
92
93
BEGIN
94
+ /* Ignore temporary tables */
95
+ SELECT relpersistence FROM pg_catalog .pg_class
96
+ WHERE oid = p_relation INTO rel_persistence;
97
+
98
+ IF rel_persistence = ' t' ::CHAR THEN
99
+ RAISE EXCEPTION ' Temporary table "%" cannot be partitioned' ,
100
+ quote_ident(p_relation::TEXT );
101
+ END IF;
102
+
93
103
IF EXISTS (SELECT * FROM @extschema@.pathman_config
94
104
WHERE partrel = p_relation) THEN
95
105
RAISE EXCEPTION ' Relation "%" has already been partitioned' , p_relation;
Original file line number Diff line number Diff line change @@ -875,7 +875,7 @@ BEGIN
875
875
WHERE oid = p_partition INTO rel_persistence;
876
876
877
877
IF rel_persistence = ' t' ::CHAR THEN
878
- RAISE EXCEPTION ' Temporary table \" % \ " cannot be used as a partition' ,
878
+ RAISE EXCEPTION ' Temporary table "% " cannot be used as a partition' ,
879
879
quote_ident(p_partition::TEXT );
880
880
END IF;
881
881
You can’t perform that action at this time.
0 commit comments