File tree Expand file tree Collapse file tree 3 files changed +23
-19
lines changed Expand file tree Collapse file tree 3 files changed +23
-19
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ EXPLAIN SELECT * FROM items WHERE id = 1234;
192192 -> Index Scan using items_34_pkey on items_34 (cost=0.28..8.29 rows=0 width=0)
193193 Index Cond: (id = 1234)
194194```
195- Note that pg_pathman exludes parent table from the query plan. To access parent table use ONLY modifier:
195+ Note that pg_pathman excludes parent table from the query plan. To access parent table use ONLY modifier:
196196```
197197EXPLAIN SELECT * FROM ONLY items;
198198 QUERY PLAN
Original file line number Diff line number Diff line change @@ -259,7 +259,11 @@ CREATE OR REPLACE FUNCTION @extschema@.get_schema_qualified_name(
259259RETURNS TEXT AS
260260$$
261261BEGIN
262- RETURN relnamespace::regnamespace || delimiter || quote_ident(relname || suffix) FROM pg_class WHERE oid = cls::oid ;
262+ RETURN (SELECT quote_ident(relnamespace::regnamespace::text ) ||
263+ delimiter ||
264+ quote_ident(relname || suffix)
265+ FROM pg_class
266+ WHERE oid = cls::oid );
263267END
264268$$
265269LANGUAGE plpgsql;
@@ -271,23 +275,23 @@ CREATE OR REPLACE FUNCTION @extschema@.validate_relations_equality(relation1 OID
271275RETURNS BOOLEAN AS
272276$$
273277DECLARE
274- rec RECORD;
278+ rec RECORD;
275279BEGIN
276- FOR rec IN (
277- WITH
278- a1 AS (select * from pg_attribute where attrelid = relation1 and attnum > 0 ),
279- a2 AS (select * from pg_attribute where attrelid = relation2 and attnum > 0 )
280- SELECT a1 .attname name1, a2 .attname name2, a1 .atttypid type1, a2 .atttypid type2
281- FROM a1
282- FULL JOIN a2 ON a1 .attnum = a2 .attnum
283- )
284- LOOP
285- IF rec .name1 IS NULL OR rec .name2 IS NULL OR rec .name1 != rec .name2 THEN
286- RETURN False;
287- END IF;
288- END LOOP;
289-
290- RETURN True;
280+ FOR rec IN (
281+ WITH
282+ a1 AS (select * from pg_attribute where attrelid = relation1 and attnum > 0 ),
283+ a2 AS (select * from pg_attribute where attrelid = relation2 and attnum > 0 )
284+ SELECT a1 .attname name1, a2 .attname name2, a1 .atttypid type1, a2 .atttypid type2
285+ FROM a1
286+ FULL JOIN a2 ON a1 .attnum = a2 .attnum
287+ )
288+ LOOP
289+ IF rec .name1 IS NULL OR rec .name2 IS NULL OR rec .name1 != rec .name2 THEN
290+ RETURN False;
291+ END IF;
292+ END LOOP;
293+
294+ RETURN True;
291295END
292296$$
293297LANGUAGE plpgsql;
Original file line number Diff line number Diff line change @@ -619,7 +619,7 @@ LANGUAGE plpgsql;
619619 * partition will be destroyed.
620620 *
621621 * Notes: dummy field is used to pass the element type to the function
622- * (it is neccessary because of pseudo-types used in function)
622+ * (it is necessary because of pseudo-types used in function)
623623 */
624624CREATE OR REPLACE FUNCTION @extschema@.merge_range_partitions_internal(
625625 p_parent_relid OID
You can’t perform that action at this time.
0 commit comments