Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf0b9bac

Browse files
committed
use quote_ident() on schema in get_schema_qualified_name(), fix typos found by codespell
1 parent2775b5a commitf0b9bac

File tree

3 files changed

+23
-19
lines changed

3 files changed

+23
-19
lines changed

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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_pathmanexludes parent table from the query plan. To access parent table use ONLY modifier:
195+
Note that pg_pathmanexcludes parent table from the query plan. To access parent table use ONLY modifier:
196196
```
197197
EXPLAIN SELECT * FROM ONLY items;
198198
QUERY PLAN

‎init.sql

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,11 @@ CREATE OR REPLACE FUNCTION @extschema@.get_schema_qualified_name(
259259
RETURNSTEXTAS
260260
$$
261261
BEGIN
262-
RETURN relnamespace::regnamespace|| delimiter|| quote_ident(relname|| suffix)FROM pg_classWHEREoid= cls::oid;
262+
RETURN (SELECT quote_ident(relnamespace::regnamespace::text)||
263+
delimiter||
264+
quote_ident(relname|| suffix)
265+
FROM pg_class
266+
WHEREoid= cls::oid);
263267
END
264268
$$
265269
LANGUAGE plpgsql;
@@ -271,23 +275,23 @@ CREATE OR REPLACE FUNCTION @extschema@.validate_relations_equality(relation1 OID
271275
RETURNSBOOLEANAS
272276
$$
273277
DECLARE
274-
rec RECORD;
278+
rec RECORD;
275279
BEGIN
276-
FOR recIN (
277-
WITH
278-
a1AS (select*from pg_attributewhere attrelid= relation1and attnum>0),
279-
a2AS (select*from pg_attributewhere attrelid= relation2and attnum>0)
280-
SELECTa1.attname name1,a2.attname name2,a1.atttypid type1,a2.atttypid type2
281-
FROM a1
282-
FULLJOIN a2ONa1.attnum=a2.attnum
283-
)
284-
LOOP
285-
IFrec.name1 ISNULLORrec.name2 ISNULLORrec.name1!=rec.name2 THEN
286-
RETURN False;
287-
END IF;
288-
END LOOP;
289-
290-
RETURN True;
280+
FOR recIN (
281+
WITH
282+
a1AS (select*from pg_attributewhere attrelid= relation1and attnum>0),
283+
a2AS (select*from pg_attributewhere attrelid= relation2and attnum>0)
284+
SELECTa1.attname name1,a2.attname name2,a1.atttypid type1,a2.atttypid type2
285+
FROM a1
286+
FULLJOIN a2ONa1.attnum=a2.attnum
287+
)
288+
LOOP
289+
IFrec.name1 ISNULLORrec.name2 ISNULLORrec.name1!=rec.name2 THEN
290+
RETURN False;
291+
END IF;
292+
END LOOP;
293+
294+
RETURN True;
291295
END
292296
$$
293297
LANGUAGE plpgsql;

‎range.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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 isneccessary because of pseudo-types used in function)
622+
* (it isnecessary because of pseudo-types used in function)
623623
*/
624624
CREATEOR REPLACE FUNCTION @extschema@.merge_range_partitions_internal(
625625
p_parent_relidOID

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp