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;
192
192
-> Index Scan using items_34_pkey on items_34 (cost=0.28..8.29 rows=0 width=0)
193
193
Index Cond: (id = 1234)
194
194
```
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:
196
196
```
197
197
EXPLAIN SELECT * FROM ONLY items;
198
198
QUERY PLAN
Original file line number Diff line number Diff line change @@ -252,7 +252,11 @@ CREATE OR REPLACE FUNCTION @extschema@.get_schema_qualified_name(
252
252
RETURNS TEXT AS
253
253
$$
254
254
BEGIN
255
- RETURN relnamespace::regnamespace || delimiter || quote_ident(relname || suffix) FROM pg_class WHERE oid = cls::oid ;
255
+ RETURN (SELECT quote_ident(relnamespace::regnamespace::text ) ||
256
+ delimiter ||
257
+ quote_ident(relname || suffix)
258
+ FROM pg_class
259
+ WHERE oid = cls::oid );
256
260
END
257
261
$$
258
262
LANGUAGE plpgsql;
@@ -264,23 +268,23 @@ CREATE OR REPLACE FUNCTION @extschema@.validate_relations_equality(relation1 OID
264
268
RETURNS BOOLEAN AS
265
269
$$
266
270
DECLARE
267
- rec RECORD;
271
+ rec RECORD;
268
272
BEGIN
269
- FOR rec IN (
270
- WITH
271
- a1 AS (select * from pg_attribute where attrelid = relation1 and attnum > 0 ),
272
- a2 AS (select * from pg_attribute where attrelid = relation2 and attnum > 0 )
273
- SELECT a1 .attname name1, a2 .attname name2, a1 .atttypid type1, a2 .atttypid type2
274
- FROM a1
275
- FULL JOIN a2 ON a1 .attnum = a2 .attnum
276
- )
277
- LOOP
278
- IF rec .name1 IS NULL OR rec .name2 IS NULL OR rec .name1 != rec .name2 THEN
279
- RETURN False;
280
- END IF;
281
- END LOOP;
282
-
283
- RETURN True;
273
+ FOR rec IN (
274
+ WITH
275
+ a1 AS (select * from pg_attribute where attrelid = relation1 and attnum > 0 ),
276
+ a2 AS (select * from pg_attribute where attrelid = relation2 and attnum > 0 )
277
+ SELECT a1 .attname name1, a2 .attname name2, a1 .atttypid type1, a2 .atttypid type2
278
+ FROM a1
279
+ FULL JOIN a2 ON a1 .attnum = a2 .attnum
280
+ )
281
+ LOOP
282
+ IF rec .name1 IS NULL OR rec .name2 IS NULL OR rec .name1 != rec .name2 THEN
283
+ RETURN False;
284
+ END IF;
285
+ END LOOP;
286
+
287
+ RETURN True;
284
288
END
285
289
$$
286
290
LANGUAGE plpgsql;
Original file line number Diff line number Diff line change @@ -613,7 +613,7 @@ LANGUAGE plpgsql;
613
613
* partition will be destroyed.
614
614
*
615
615
* Notes: dummy field is used to pass the element type to the function
616
- * (it is neccessary because of pseudo-types used in function)
616
+ * (it is necessary because of pseudo-types used in function)
617
617
*/
618
618
CREATE OR REPLACE FUNCTION @extschema@.merge_range_partitions_internal(
619
619
p_parent_relid OID
You can’t perform that action at this time.
0 commit comments