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 6969 PERFORM @extschema@.partition_data(parent_relid);
7070
7171 RETURN partitions_count;
72+
73+ EXCEPTION WHEN others THEN
74+ RAISE EXCEPTION ' %' , SQLERRM;
7275END
7376$$ LANGUAGE plpgsql
7477SET client_min_messages = WARNING;
Original file line number Diff line number Diff line change 8888DECLARE
8989 v_rec RECORD;
9090 is_referenced BOOLEAN ;
91+ rel_persistence CHAR ;
9192
9293BEGIN
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+
93103 IF EXISTS (SELECT * FROM @extschema@.pathman_config
94104 WHERE partrel = p_relation) THEN
95105 RAISE EXCEPTION ' Relation "%" has already been partitioned' , p_relation;
Original file line number Diff line number Diff line change @@ -875,7 +875,7 @@ BEGIN
875875 WHERE oid = p_partition INTO rel_persistence;
876876
877877 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' ,
879879 quote_ident(p_partition::TEXT );
880880 END IF;
881881
You can’t perform that action at this time.
0 commit comments