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

Commita2688c4

Browse files
committed
Fix some incorrectness in upgrade_adapt.sql on query for WITH OIDS
The query used to disable WITH OIDS in all the relations making use ofit was checking for materialized views, but this is not a supportedoperation. On the contrary, this needs to be done on foreign tables.While on it, use quote_ident() in the ALTER TABLE strings built on therelation name.Author: Anton A. Melnikov, Michael PaquierDiscussion:https://postgr.es/m/49f389ba-95ce-8a9b-09ae-f60650c0e7c7@inbox.ruBackpatch-through: 12
1 parent7445869 commita2688c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/bin/pg_upgrade/upgrade_adapt.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ DO $stmt$
7171
FROM pg_class
7272
WHERE relname !~'^pg_'
7373
AND relhasoids
74-
AND relkindin ('r','m')
74+
AND relkindin ('r','f')
7575
ORDER BY1
7676
LOOP
77-
execute'ALTER TABLE'|| rec||' SET WITHOUT OIDS';
77+
EXECUTE'ALTER TABLE'||quote_ident(rec)||' SET WITHOUT OIDS';
7878
END LOOP;
7979
END; $stmt$;
8080
\endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp