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 @@ -259,7 +259,11 @@ CREATE OR REPLACE FUNCTION @extschema@.get_schema_qualified_name(
259
259
RETURNS TEXT AS
260
260
$$
261
261
BEGIN
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 );
263
267
END
264
268
$$
265
269
LANGUAGE plpgsql;
@@ -271,23 +275,23 @@ CREATE OR REPLACE FUNCTION @extschema@.validate_relations_equality(relation1 OID
271
275
RETURNS BOOLEAN AS
272
276
$$
273
277
DECLARE
274
- rec RECORD;
278
+ rec RECORD;
275
279
BEGIN
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;
291
295
END
292
296
$$
293
297
LANGUAGE plpgsql;
Original file line number Diff line number Diff line change @@ -619,7 +619,7 @@ LANGUAGE plpgsql;
619
619
* partition will be destroyed.
620
620
*
621
621
* 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)
623
623
*/
624
624
CREATE OR REPLACE FUNCTION @extschema@.merge_range_partitions_internal(
625
625
p_parent_relid OID
You can’t perform that action at this time.
0 commit comments