You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by re...@apache.org on 2025/02/24 16:23:44 UTC
(cloudberry) 09/14: Fix some incorrectness in upgrade_adapt.sql on query for WITH OIDS
This is an automated email from the ASF dual-hosted git repository.
reshke pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit 78a82672436d81c106246197ca997cf76f2e5eb9
Author: Michael Paquier <mi...@paquier.xyz>
AuthorDate: Fri Dec 23 11:27:18 2022 +0900
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 of
it was checking for materialized views, but this is not a supported
operation. On the contrary, this needs to be done on foreign tables.
While on it, use quote_ident() in the ALTER TABLE strings built on the
relation name.
Author: Anton A. Melnikov, Michael Paquier
Discussion: https://postgr.es/m/49f389ba-95ce-8a9b-09ae-f60650c0e7c7@inbox.ru
Backpatch-through: 12
(cherry picked from commit a2688c4e0329687ca5105b7647bbff6bbe33cca4)
---
src/bin/pg_upgrade/upgrade_adapt.sql | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/bin/pg_upgrade/upgrade_adapt.sql b/src/bin/pg_upgrade/upgrade_adapt.sql
index 27c4c7fd01..d0580e4282 100644
--- a/src/bin/pg_upgrade/upgrade_adapt.sql
+++ b/src/bin/pg_upgrade/upgrade_adapt.sql
@@ -72,10 +72,10 @@ DO $stmt$
FROM pg_class
WHERE relname !~ '^pg_'
AND relhasoids
- AND relkind in ('r','m')
+ AND relkind in ('r', 'f')
ORDER BY 1
LOOP
- execute 'ALTER TABLE ' || rec || ' SET WITHOUT OIDS';
+ EXECUTE 'ALTER TABLE ' || quote_ident(rec) || ' SET WITHOUT OIDS';
END LOOP;
END; $stmt$;
\endif
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org