diff --git a/src/gausskernel/process/tcop/postgres.cpp b/src/gausskernel/process/tcop/postgres.cpp index fabdf2d53..f47f1d7f5 100755 --- a/src/gausskernel/process/tcop/postgres.cpp +++ b/src/gausskernel/process/tcop/postgres.cpp @@ -7697,13 +7697,7 @@ void LoadSqlPlugin() if (u_sess->proc_cxt.MyDatabaseId != InvalidOid && DB_IS_CMPT(B_FORMAT) && IsFileExisted(DOLPHIN)) { /* start_xact_command will change CurrentResourceOwner, so save it here */ ResourceOwner save = t_thrd.utils_cxt.CurrentResourceOwner; - if (!u_sess->attr.attr_sql.dolphin && -#ifdef ENABLE_LITE_MODE - u_sess->attr.attr_common.upgrade_mode == 0 -#else - !u_sess->attr.attr_common.IsInplaceUpgrade -#endif - ) { + if (!u_sess->attr.attr_sql.dolphin && u_sess->attr.attr_common.upgrade_mode == 0) { Oid userId = GetUserId(); if (userId != INITIAL_USER_ID) { ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), diff --git a/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_806.sql b/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_806.sql index 01e062993..4c64a7d0b 100644 --- a/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_806.sql +++ b/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_806.sql @@ -1,3 +1,8 @@ +DO $upgrade$ +BEGIN +IF working_version_num() < 92780 then DROP FUNCTION IF EXISTS pg_catalog.sha(text) CASCADE; DROP FUNCTION IF EXISTS pg_catalog.sha1(text) CASCADE; -DROP FUNCTION IF EXISTS pg_catalog.sha2(text, bigint) CASCADE; \ No newline at end of file +DROP FUNCTION IF EXISTS pg_catalog.sha2(text, bigint) CASCADE; +END IF; +END $upgrade$; \ No newline at end of file diff --git a/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_812.sql b/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_812.sql index 395c2ce32..9b20a1788 100644 --- a/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_812.sql +++ b/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_812.sql @@ -1,3 +1,6 @@ +DO $upgrade$ +BEGIN +IF working_version_num() < 92780 then -------------------------------------------------------------- -- delete pg_amop -------------------------------------------------------------- @@ -23,7 +26,6 @@ delete from pg_catalog.pg_opfamily where oid = 8646; -------------------------------------------------------------- -- delete pg_cast -------------------------------------------------------------- -DO $$ DECLARE cnt int; BEGIN @@ -50,13 +52,12 @@ BEGIN DROP CAST IF EXISTS (anyset AS nvarchar2) CASCADE; DROP CAST IF EXISTS (nvarchar2 AS anyset) CASCADE; end if; -END$$; +END; -------------------------------------------------------------- -- delete pg_operator -------------------------------------------------------------- -DO $$ DECLARE cnt int; BEGIN @@ -117,13 +118,12 @@ BEGIN DROP OPERATOR IF EXISTS pg_catalog.<=(text, anyset) CASCADE; DROP OPERATOR IF EXISTS pg_catalog.>=(text, anyset) CASCADE; end if; -END$$; +END; -------------------------------------------------------------- -- delete builtin funcs -------------------------------------------------------------- -DO $$ DECLARE cnt int; BEGIN @@ -222,12 +222,11 @@ BEGIN DROP FUNCTION IF EXISTS pg_catalog.anyset_in(cstring) CASCADE; DROP FUNCTION IF EXISTS pg_catalog.anyset_out(anyset) CASCADE; end if; -END$$; +END; -------------------------------------------------------------- -- delete all set types -------------------------------------------------------------- -DO $$ DECLARE stmt text; cursor r is select typname from pg_type where typcategory = 'H'; @@ -237,7 +236,7 @@ BEGIN stmt := 'DROP TYPE IF EXISTS pg_catalog.' || tname.typname || ' CASCADE'; execute immediate stmt; end loop; -END$$; +END; DROP TYPE IF EXISTS pg_catalog.anyset CASCADE; @@ -249,3 +248,6 @@ DROP INDEX IF EXISTS pg_catalog.pg_set_typid_label_index; DROP INDEX IF EXISTS pg_catalog.pg_set_oid_index; DROP TYPE IF EXISTS pg_catalog.pg_set; DROP TABLE IF EXISTS pg_catalog.pg_set; + +END IF; +END $upgrade$; diff --git a/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_920.sql b/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_920.sql index ed05e8404..1f4ec9e42 100644 --- a/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_920.sql +++ b/src/include/catalog/upgrade_sql/rollback_catalog_maindb/rollback-post_catalog_maindb_92_920.sql @@ -1,6 +1,6 @@ do $$DECLARE ans boolean; BEGIN - for ans in select case when count(*) = 1 then true else false end as ans from (select relname from pg_class where relname = 'pg_publication_tables' and relkind = 'v') + for ans in select case when count(*) = 1 then true else false end as ans from (select relname from pg_class where relname = 'pg_publication_tables' and relkind = 'v' and relnamespace = 11) LOOP if ans = true then -- base version is after 92-507, create older view DROP VIEW IF EXISTS pg_catalog.pg_publication_tables; diff --git a/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_806.sql b/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_806.sql index 01e062993..4c64a7d0b 100644 --- a/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_806.sql +++ b/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_806.sql @@ -1,3 +1,8 @@ +DO $upgrade$ +BEGIN +IF working_version_num() < 92780 then DROP FUNCTION IF EXISTS pg_catalog.sha(text) CASCADE; DROP FUNCTION IF EXISTS pg_catalog.sha1(text) CASCADE; -DROP FUNCTION IF EXISTS pg_catalog.sha2(text, bigint) CASCADE; \ No newline at end of file +DROP FUNCTION IF EXISTS pg_catalog.sha2(text, bigint) CASCADE; +END IF; +END $upgrade$; \ No newline at end of file diff --git a/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_812.sql b/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_812.sql index 395c2ce32..9b20a1788 100644 --- a/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_812.sql +++ b/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_812.sql @@ -1,3 +1,6 @@ +DO $upgrade$ +BEGIN +IF working_version_num() < 92780 then -------------------------------------------------------------- -- delete pg_amop -------------------------------------------------------------- @@ -23,7 +26,6 @@ delete from pg_catalog.pg_opfamily where oid = 8646; -------------------------------------------------------------- -- delete pg_cast -------------------------------------------------------------- -DO $$ DECLARE cnt int; BEGIN @@ -50,13 +52,12 @@ BEGIN DROP CAST IF EXISTS (anyset AS nvarchar2) CASCADE; DROP CAST IF EXISTS (nvarchar2 AS anyset) CASCADE; end if; -END$$; +END; -------------------------------------------------------------- -- delete pg_operator -------------------------------------------------------------- -DO $$ DECLARE cnt int; BEGIN @@ -117,13 +118,12 @@ BEGIN DROP OPERATOR IF EXISTS pg_catalog.<=(text, anyset) CASCADE; DROP OPERATOR IF EXISTS pg_catalog.>=(text, anyset) CASCADE; end if; -END$$; +END; -------------------------------------------------------------- -- delete builtin funcs -------------------------------------------------------------- -DO $$ DECLARE cnt int; BEGIN @@ -222,12 +222,11 @@ BEGIN DROP FUNCTION IF EXISTS pg_catalog.anyset_in(cstring) CASCADE; DROP FUNCTION IF EXISTS pg_catalog.anyset_out(anyset) CASCADE; end if; -END$$; +END; -------------------------------------------------------------- -- delete all set types -------------------------------------------------------------- -DO $$ DECLARE stmt text; cursor r is select typname from pg_type where typcategory = 'H'; @@ -237,7 +236,7 @@ BEGIN stmt := 'DROP TYPE IF EXISTS pg_catalog.' || tname.typname || ' CASCADE'; execute immediate stmt; end loop; -END$$; +END; DROP TYPE IF EXISTS pg_catalog.anyset CASCADE; @@ -249,3 +248,6 @@ DROP INDEX IF EXISTS pg_catalog.pg_set_typid_label_index; DROP INDEX IF EXISTS pg_catalog.pg_set_oid_index; DROP TYPE IF EXISTS pg_catalog.pg_set; DROP TABLE IF EXISTS pg_catalog.pg_set; + +END IF; +END $upgrade$; diff --git a/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_920.sql b/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_920.sql index d247eb62e..07ecd2c02 100644 --- a/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_920.sql +++ b/src/include/catalog/upgrade_sql/rollback_catalog_otherdb/rollback-post_catalog_otherdb_92_920.sql @@ -1,6 +1,6 @@ do $$DECLARE ans boolean; BEGIN - for ans in select case when count(*) = 1 then true else false end as ans from (select relname from pg_class where relname = 'pg_publication_tables' and relkind = 'v') + for ans in select case when count(*) = 1 then true else false end as ans from (select relname from pg_class where relname = 'pg_publication_tables' and relkind = 'v' and relnamespace = 11) LOOP if ans = true then -- base version is after 92-507, create older view DROP VIEW IF EXISTS pg_catalog.pg_publication_tables; diff --git a/src/include/catalog/upgrade_sql/upgrade_catalog_maindb/upgrade-post_catalog_maindb_92_806.sql b/src/include/catalog/upgrade_sql/upgrade_catalog_maindb/upgrade-post_catalog_maindb_92_806.sql index 706cf5506..9c62f5d9a 100644 --- a/src/include/catalog/upgrade_sql/upgrade_catalog_maindb/upgrade-post_catalog_maindb_92_806.sql +++ b/src/include/catalog/upgrade_sql/upgrade_catalog_maindb/upgrade-post_catalog_maindb_92_806.sql @@ -1,3 +1,6 @@ +DO $upgrade$ +BEGIN +IF working_version_num() < 92780 then --sha SET LOCAL inplace_upgrade_next_system_object_oids = IUO_PROC, 558; CREATE OR REPLACE FUNCTION pg_catalog.sha(text) @@ -28,3 +31,5 @@ AS $function$sha2$function$; comment on function PG_CATALOG.sha2(text,bigint) is 'use the sha2 algorithm to hash'; SET LOCAL inplace_upgrade_next_system_object_oids = IUO_CATALOG, false, true, 0, 0, 0, 0; +END IF; +END $upgrade$; \ No newline at end of file diff --git a/src/include/catalog/upgrade_sql/upgrade_catalog_maindb/upgrade-post_catalog_maindb_92_812.sql b/src/include/catalog/upgrade_sql/upgrade_catalog_maindb/upgrade-post_catalog_maindb_92_812.sql index f9e0313ec..3a4a1a06f 100644 --- a/src/include/catalog/upgrade_sql/upgrade_catalog_maindb/upgrade-post_catalog_maindb_92_812.sql +++ b/src/include/catalog/upgrade_sql/upgrade_catalog_maindb/upgrade-post_catalog_maindb_92_812.sql @@ -1,3 +1,6 @@ +DO $upgrade$ +BEGIN +IF working_version_num() < 92780 then -------------------------------------------------------------- -- add pg_set table -------------------------------------------------------------- @@ -1088,7 +1091,7 @@ END; $$ LANGUAGE 'plpgsql'; SET LOCAL inplace_upgrade_next_system_object_oids = IUO_GENERAL, 8646; -select Insert_pg_opfamily_temp(405, 'set_ops', 11, 10); +PERFORM Insert_pg_opfamily_temp(405, 'set_ops', 11, 10); DROP FUNCTION Insert_pg_opfamily_temp(); @@ -1113,11 +1116,11 @@ BEGIN END; $$ LANGUAGE 'plpgsql'; -select Insert_pg_opclass_temp(403, 'setasint_ops', 11, 10, 1976, 3272, true, 0); -select Insert_pg_opclass_temp(405, 'setasint_ops', 11, 10, 1977, 3272, false, 0); -select Insert_pg_opclass_temp(405, 'settext_ops', 11, 10, 1995, 3272, false, 0); -select Insert_pg_opclass_temp(4439, 'setasint_ops', 11, 10, 6976, 3272, true, 0); -select Insert_pg_opclass_temp(405, 'set_ops', 11, 10, 8646, 3272, true, 0); +PERFORM Insert_pg_opclass_temp(403, 'setasint_ops', 11, 10, 1976, 3272, true, 0); +PERFORM Insert_pg_opclass_temp(405, 'setasint_ops', 11, 10, 1977, 3272, false, 0); +PERFORM Insert_pg_opclass_temp(405, 'settext_ops', 11, 10, 1995, 3272, false, 0); +PERFORM Insert_pg_opclass_temp(4439, 'setasint_ops', 11, 10, 6976, 3272, true, 0); +PERFORM Insert_pg_opclass_temp(405, 'set_ops', 11, 10, 8646, 3272, true, 0); DROP FUNCTION Insert_pg_opclass_temp(); @@ -1139,25 +1142,25 @@ BEGIN END; $$ LANGUAGE 'plpgsql'; -SELECT Insert_pg_amproc_temp(1976, 3272, 3272, 1, 6544); -SELECT Insert_pg_amproc_temp(1976, 3272, 3272, 2, 6538); -SELECT Insert_pg_amproc_temp(1976, 3272, 23, 1, 6545); -SELECT Insert_pg_amproc_temp(1976, 23, 3272, 1, 6543); -SELECT Insert_pg_amproc_temp(1976, 3272, 20, 1, 6546); -SELECT Insert_pg_amproc_temp(1976, 20, 3272, 1, 6547); -SELECT Insert_pg_amproc_temp(1976, 3272, 21, 1, 6549); -SELECT Insert_pg_amproc_temp(1976, 21, 3272, 1, 6548); -SELECT Insert_pg_amproc_temp(1977, 3272, 3272, 1, 3294); -SELECT Insert_pg_amproc_temp(1995, 3272, 3272, 1, 3297); -SELECT Insert_pg_amproc_temp(8646, 3272, 3272, 1, 3297); -SELECT Insert_pg_amproc_temp(6976, 3272, 3272, 1, 6544); -SELECT Insert_pg_amproc_temp(6976, 3272, 3272, 2, 6538); -SELECT Insert_pg_amproc_temp(6976, 3272, 23, 1, 6545); -SELECT Insert_pg_amproc_temp(6976, 23, 3272, 1, 6543); -SELECT Insert_pg_amproc_temp(6976, 3272, 20, 1, 6546); -SELECT Insert_pg_amproc_temp(6976, 20, 3272, 1, 6547); -SELECT Insert_pg_amproc_temp(6976, 3272, 21, 1, 6549); -SELECT Insert_pg_amproc_temp(6976, 21, 3272, 1, 6548); +PERFORM Insert_pg_amproc_temp(1976, 3272, 3272, 1, 6544); +PERFORM Insert_pg_amproc_temp(1976, 3272, 3272, 2, 6538); +PERFORM Insert_pg_amproc_temp(1976, 3272, 23, 1, 6545); +PERFORM Insert_pg_amproc_temp(1976, 23, 3272, 1, 6543); +PERFORM Insert_pg_amproc_temp(1976, 3272, 20, 1, 6546); +PERFORM Insert_pg_amproc_temp(1976, 20, 3272, 1, 6547); +PERFORM Insert_pg_amproc_temp(1976, 3272, 21, 1, 6549); +PERFORM Insert_pg_amproc_temp(1976, 21, 3272, 1, 6548); +PERFORM Insert_pg_amproc_temp(1977, 3272, 3272, 1, 3294); +PERFORM Insert_pg_amproc_temp(1995, 3272, 3272, 1, 3297); +PERFORM Insert_pg_amproc_temp(8646, 3272, 3272, 1, 3297); +PERFORM Insert_pg_amproc_temp(6976, 3272, 3272, 1, 6544); +PERFORM Insert_pg_amproc_temp(6976, 3272, 3272, 2, 6538); +PERFORM Insert_pg_amproc_temp(6976, 3272, 23, 1, 6545); +PERFORM Insert_pg_amproc_temp(6976, 23, 3272, 1, 6543); +PERFORM Insert_pg_amproc_temp(6976, 3272, 20, 1, 6546); +PERFORM Insert_pg_amproc_temp(6976, 20, 3272, 1, 6547); +PERFORM Insert_pg_amproc_temp(6976, 3272, 21, 1, 6549); +PERFORM Insert_pg_amproc_temp(6976, 21, 3272, 1, 6548); DROP FUNCTION Insert_pg_amproc_temp(); @@ -1188,85 +1191,88 @@ BEGIN END; $$ LANGUAGE 'plpgsql'; -SELECT Insert_pg_amop_temp(1995, 3272, 25, 1, 's', 405, 0); -SELECT Insert_pg_amop_temp(1995, 25, 3272, 1, 's', 405, 0); -SELECT Insert_pg_amop_temp(1995, 3272, 3272, 1, 's', 405, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 3272, 1, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 3272, 2, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 3272, 3, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 3272, 4, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 3272, 5, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 23, 1, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 23, 2, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 23, 3, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 23, 4, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 23, 5, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 23, 3272, 1, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 23, 3272, 2, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 23, 3272, 3, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 23, 3272, 4, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 23, 3272, 5, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 20, 1, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 20, 2, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 20, 3, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 20, 4, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 20, 5, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 20, 3272, 1, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 20, 3272, 2, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 20, 3272, 3, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 20, 3272, 4, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 20, 3272, 5, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 21, 1, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 21, 2, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 21, 3, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 21, 4, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 21, 5, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 21, 3272, 1, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 21, 3272, 2, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 21, 3272, 3, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 21, 3272, 4, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 21, 3272, 5, 's', 403, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 3272, 1, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 3272, 2, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 3272, 3, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 3272, 4, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 3272, 5, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 23, 1, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 23, 2, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 23, 3, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 23, 4, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 23, 5, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 23, 3272, 1, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 23, 3272, 2, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 23, 3272, 3, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 23, 3272, 4, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 23, 3272, 5, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 20, 1, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 20, 2, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 20, 3, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 20, 4, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 20, 5, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 20, 3272, 1, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 20, 3272, 2, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 20, 3272, 3, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 20, 3272, 4, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 20, 3272, 5, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 21, 1, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 21, 2, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 21, 3, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 21, 4, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 21, 5, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 21, 3272, 1, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 21, 3272, 2, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 21, 3272, 3, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 21, 3272, 4, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 21, 3272, 5, 's', 4439, 0); -SELECT Insert_pg_amop_temp(1977, 3272, 23, 1, 's', 405, 0); -SELECT Insert_pg_amop_temp(1977, 23, 3272, 1, 's', 405, 0); -SELECT Insert_pg_amop_temp(1977, 3272, 20, 1, 's', 405, 0); -SELECT Insert_pg_amop_temp(1977, 20, 3272, 1, 's', 405, 0); -SELECT Insert_pg_amop_temp(1977, 3272, 21, 1, 's', 405, 0); -SELECT Insert_pg_amop_temp(1977, 21, 3272, 1, 's', 405, 0); -SELECT Insert_pg_amop_temp(8646, 3272, 3272, 1, 's', 405, 0); +PERFORM Insert_pg_amop_temp(1995, 3272, 25, 1, 's', 405, 0); +PERFORM Insert_pg_amop_temp(1995, 25, 3272, 1, 's', 405, 0); +PERFORM Insert_pg_amop_temp(1995, 3272, 3272, 1, 's', 405, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 3272, 1, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 3272, 2, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 3272, 3, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 3272, 4, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 3272, 5, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 23, 1, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 23, 2, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 23, 3, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 23, 4, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 23, 5, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 23, 3272, 1, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 23, 3272, 2, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 23, 3272, 3, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 23, 3272, 4, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 23, 3272, 5, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 20, 1, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 20, 2, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 20, 3, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 20, 4, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 20, 5, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 20, 3272, 1, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 20, 3272, 2, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 20, 3272, 3, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 20, 3272, 4, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 20, 3272, 5, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 21, 1, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 21, 2, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 21, 3, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 21, 4, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 21, 5, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 21, 3272, 1, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 21, 3272, 2, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 21, 3272, 3, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 21, 3272, 4, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 21, 3272, 5, 's', 403, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 3272, 1, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 3272, 2, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 3272, 3, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 3272, 4, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 3272, 5, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 23, 1, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 23, 2, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 23, 3, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 23, 4, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 23, 5, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 23, 3272, 1, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 23, 3272, 2, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 23, 3272, 3, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 23, 3272, 4, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 23, 3272, 5, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 20, 1, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 20, 2, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 20, 3, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 20, 4, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 20, 5, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 20, 3272, 1, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 20, 3272, 2, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 20, 3272, 3, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 20, 3272, 4, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 20, 3272, 5, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 21, 1, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 21, 2, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 21, 3, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 21, 4, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 21, 5, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 21, 3272, 1, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 21, 3272, 2, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 21, 3272, 3, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 21, 3272, 4, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 21, 3272, 5, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(1977, 3272, 23, 1, 's', 405, 0); +PERFORM Insert_pg_amop_temp(1977, 23, 3272, 1, 's', 405, 0); +PERFORM Insert_pg_amop_temp(1977, 3272, 20, 1, 's', 405, 0); +PERFORM Insert_pg_amop_temp(1977, 20, 3272, 1, 's', 405, 0); +PERFORM Insert_pg_amop_temp(1977, 3272, 21, 1, 's', 405, 0); +PERFORM Insert_pg_amop_temp(1977, 21, 3272, 1, 's', 405, 0); +PERFORM Insert_pg_amop_temp(8646, 3272, 3272, 1, 's', 405, 0); DROP FUNCTION Insert_pg_amop_temp(); + +END IF; +END $upgrade$; \ No newline at end of file diff --git a/src/include/catalog/upgrade_sql/upgrade_catalog_otherdb/upgrade-post_catalog_otherdb_92_806.sql b/src/include/catalog/upgrade_sql/upgrade_catalog_otherdb/upgrade-post_catalog_otherdb_92_806.sql index 706cf5506..d90cc3836 100644 --- a/src/include/catalog/upgrade_sql/upgrade_catalog_otherdb/upgrade-post_catalog_otherdb_92_806.sql +++ b/src/include/catalog/upgrade_sql/upgrade_catalog_otherdb/upgrade-post_catalog_otherdb_92_806.sql @@ -1,3 +1,6 @@ +DO $upgrade$ +BEGIN +IF working_version_num() < 92780 then --sha SET LOCAL inplace_upgrade_next_system_object_oids = IUO_PROC, 558; CREATE OR REPLACE FUNCTION pg_catalog.sha(text) @@ -28,3 +31,5 @@ AS $function$sha2$function$; comment on function PG_CATALOG.sha2(text,bigint) is 'use the sha2 algorithm to hash'; SET LOCAL inplace_upgrade_next_system_object_oids = IUO_CATALOG, false, true, 0, 0, 0, 0; +END IF; +END $upgrade$; diff --git a/src/include/catalog/upgrade_sql/upgrade_catalog_otherdb/upgrade-post_catalog_otherdb_92_812.sql b/src/include/catalog/upgrade_sql/upgrade_catalog_otherdb/upgrade-post_catalog_otherdb_92_812.sql index f9e0313ec..3a4a1a06f 100644 --- a/src/include/catalog/upgrade_sql/upgrade_catalog_otherdb/upgrade-post_catalog_otherdb_92_812.sql +++ b/src/include/catalog/upgrade_sql/upgrade_catalog_otherdb/upgrade-post_catalog_otherdb_92_812.sql @@ -1,3 +1,6 @@ +DO $upgrade$ +BEGIN +IF working_version_num() < 92780 then -------------------------------------------------------------- -- add pg_set table -------------------------------------------------------------- @@ -1088,7 +1091,7 @@ END; $$ LANGUAGE 'plpgsql'; SET LOCAL inplace_upgrade_next_system_object_oids = IUO_GENERAL, 8646; -select Insert_pg_opfamily_temp(405, 'set_ops', 11, 10); +PERFORM Insert_pg_opfamily_temp(405, 'set_ops', 11, 10); DROP FUNCTION Insert_pg_opfamily_temp(); @@ -1113,11 +1116,11 @@ BEGIN END; $$ LANGUAGE 'plpgsql'; -select Insert_pg_opclass_temp(403, 'setasint_ops', 11, 10, 1976, 3272, true, 0); -select Insert_pg_opclass_temp(405, 'setasint_ops', 11, 10, 1977, 3272, false, 0); -select Insert_pg_opclass_temp(405, 'settext_ops', 11, 10, 1995, 3272, false, 0); -select Insert_pg_opclass_temp(4439, 'setasint_ops', 11, 10, 6976, 3272, true, 0); -select Insert_pg_opclass_temp(405, 'set_ops', 11, 10, 8646, 3272, true, 0); +PERFORM Insert_pg_opclass_temp(403, 'setasint_ops', 11, 10, 1976, 3272, true, 0); +PERFORM Insert_pg_opclass_temp(405, 'setasint_ops', 11, 10, 1977, 3272, false, 0); +PERFORM Insert_pg_opclass_temp(405, 'settext_ops', 11, 10, 1995, 3272, false, 0); +PERFORM Insert_pg_opclass_temp(4439, 'setasint_ops', 11, 10, 6976, 3272, true, 0); +PERFORM Insert_pg_opclass_temp(405, 'set_ops', 11, 10, 8646, 3272, true, 0); DROP FUNCTION Insert_pg_opclass_temp(); @@ -1139,25 +1142,25 @@ BEGIN END; $$ LANGUAGE 'plpgsql'; -SELECT Insert_pg_amproc_temp(1976, 3272, 3272, 1, 6544); -SELECT Insert_pg_amproc_temp(1976, 3272, 3272, 2, 6538); -SELECT Insert_pg_amproc_temp(1976, 3272, 23, 1, 6545); -SELECT Insert_pg_amproc_temp(1976, 23, 3272, 1, 6543); -SELECT Insert_pg_amproc_temp(1976, 3272, 20, 1, 6546); -SELECT Insert_pg_amproc_temp(1976, 20, 3272, 1, 6547); -SELECT Insert_pg_amproc_temp(1976, 3272, 21, 1, 6549); -SELECT Insert_pg_amproc_temp(1976, 21, 3272, 1, 6548); -SELECT Insert_pg_amproc_temp(1977, 3272, 3272, 1, 3294); -SELECT Insert_pg_amproc_temp(1995, 3272, 3272, 1, 3297); -SELECT Insert_pg_amproc_temp(8646, 3272, 3272, 1, 3297); -SELECT Insert_pg_amproc_temp(6976, 3272, 3272, 1, 6544); -SELECT Insert_pg_amproc_temp(6976, 3272, 3272, 2, 6538); -SELECT Insert_pg_amproc_temp(6976, 3272, 23, 1, 6545); -SELECT Insert_pg_amproc_temp(6976, 23, 3272, 1, 6543); -SELECT Insert_pg_amproc_temp(6976, 3272, 20, 1, 6546); -SELECT Insert_pg_amproc_temp(6976, 20, 3272, 1, 6547); -SELECT Insert_pg_amproc_temp(6976, 3272, 21, 1, 6549); -SELECT Insert_pg_amproc_temp(6976, 21, 3272, 1, 6548); +PERFORM Insert_pg_amproc_temp(1976, 3272, 3272, 1, 6544); +PERFORM Insert_pg_amproc_temp(1976, 3272, 3272, 2, 6538); +PERFORM Insert_pg_amproc_temp(1976, 3272, 23, 1, 6545); +PERFORM Insert_pg_amproc_temp(1976, 23, 3272, 1, 6543); +PERFORM Insert_pg_amproc_temp(1976, 3272, 20, 1, 6546); +PERFORM Insert_pg_amproc_temp(1976, 20, 3272, 1, 6547); +PERFORM Insert_pg_amproc_temp(1976, 3272, 21, 1, 6549); +PERFORM Insert_pg_amproc_temp(1976, 21, 3272, 1, 6548); +PERFORM Insert_pg_amproc_temp(1977, 3272, 3272, 1, 3294); +PERFORM Insert_pg_amproc_temp(1995, 3272, 3272, 1, 3297); +PERFORM Insert_pg_amproc_temp(8646, 3272, 3272, 1, 3297); +PERFORM Insert_pg_amproc_temp(6976, 3272, 3272, 1, 6544); +PERFORM Insert_pg_amproc_temp(6976, 3272, 3272, 2, 6538); +PERFORM Insert_pg_amproc_temp(6976, 3272, 23, 1, 6545); +PERFORM Insert_pg_amproc_temp(6976, 23, 3272, 1, 6543); +PERFORM Insert_pg_amproc_temp(6976, 3272, 20, 1, 6546); +PERFORM Insert_pg_amproc_temp(6976, 20, 3272, 1, 6547); +PERFORM Insert_pg_amproc_temp(6976, 3272, 21, 1, 6549); +PERFORM Insert_pg_amproc_temp(6976, 21, 3272, 1, 6548); DROP FUNCTION Insert_pg_amproc_temp(); @@ -1188,85 +1191,88 @@ BEGIN END; $$ LANGUAGE 'plpgsql'; -SELECT Insert_pg_amop_temp(1995, 3272, 25, 1, 's', 405, 0); -SELECT Insert_pg_amop_temp(1995, 25, 3272, 1, 's', 405, 0); -SELECT Insert_pg_amop_temp(1995, 3272, 3272, 1, 's', 405, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 3272, 1, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 3272, 2, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 3272, 3, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 3272, 4, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 3272, 5, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 23, 1, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 23, 2, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 23, 3, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 23, 4, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 23, 5, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 23, 3272, 1, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 23, 3272, 2, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 23, 3272, 3, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 23, 3272, 4, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 23, 3272, 5, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 20, 1, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 20, 2, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 20, 3, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 20, 4, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 20, 5, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 20, 3272, 1, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 20, 3272, 2, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 20, 3272, 3, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 20, 3272, 4, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 20, 3272, 5, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 21, 1, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 21, 2, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 21, 3, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 21, 4, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 3272, 21, 5, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 21, 3272, 1, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 21, 3272, 2, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 21, 3272, 3, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 21, 3272, 4, 's', 403, 0); -SELECT Insert_pg_amop_temp(1976, 21, 3272, 5, 's', 403, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 3272, 1, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 3272, 2, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 3272, 3, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 3272, 4, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 3272, 5, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 23, 1, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 23, 2, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 23, 3, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 23, 4, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 23, 5, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 23, 3272, 1, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 23, 3272, 2, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 23, 3272, 3, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 23, 3272, 4, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 23, 3272, 5, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 20, 1, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 20, 2, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 20, 3, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 20, 4, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 20, 5, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 20, 3272, 1, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 20, 3272, 2, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 20, 3272, 3, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 20, 3272, 4, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 20, 3272, 5, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 21, 1, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 21, 2, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 21, 3, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 21, 4, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 3272, 21, 5, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 21, 3272, 1, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 21, 3272, 2, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 21, 3272, 3, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 21, 3272, 4, 's', 4439, 0); -SELECT Insert_pg_amop_temp(6976, 21, 3272, 5, 's', 4439, 0); -SELECT Insert_pg_amop_temp(1977, 3272, 23, 1, 's', 405, 0); -SELECT Insert_pg_amop_temp(1977, 23, 3272, 1, 's', 405, 0); -SELECT Insert_pg_amop_temp(1977, 3272, 20, 1, 's', 405, 0); -SELECT Insert_pg_amop_temp(1977, 20, 3272, 1, 's', 405, 0); -SELECT Insert_pg_amop_temp(1977, 3272, 21, 1, 's', 405, 0); -SELECT Insert_pg_amop_temp(1977, 21, 3272, 1, 's', 405, 0); -SELECT Insert_pg_amop_temp(8646, 3272, 3272, 1, 's', 405, 0); +PERFORM Insert_pg_amop_temp(1995, 3272, 25, 1, 's', 405, 0); +PERFORM Insert_pg_amop_temp(1995, 25, 3272, 1, 's', 405, 0); +PERFORM Insert_pg_amop_temp(1995, 3272, 3272, 1, 's', 405, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 3272, 1, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 3272, 2, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 3272, 3, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 3272, 4, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 3272, 5, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 23, 1, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 23, 2, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 23, 3, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 23, 4, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 23, 5, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 23, 3272, 1, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 23, 3272, 2, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 23, 3272, 3, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 23, 3272, 4, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 23, 3272, 5, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 20, 1, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 20, 2, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 20, 3, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 20, 4, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 20, 5, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 20, 3272, 1, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 20, 3272, 2, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 20, 3272, 3, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 20, 3272, 4, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 20, 3272, 5, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 21, 1, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 21, 2, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 21, 3, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 21, 4, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 3272, 21, 5, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 21, 3272, 1, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 21, 3272, 2, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 21, 3272, 3, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 21, 3272, 4, 's', 403, 0); +PERFORM Insert_pg_amop_temp(1976, 21, 3272, 5, 's', 403, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 3272, 1, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 3272, 2, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 3272, 3, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 3272, 4, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 3272, 5, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 23, 1, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 23, 2, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 23, 3, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 23, 4, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 23, 5, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 23, 3272, 1, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 23, 3272, 2, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 23, 3272, 3, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 23, 3272, 4, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 23, 3272, 5, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 20, 1, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 20, 2, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 20, 3, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 20, 4, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 20, 5, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 20, 3272, 1, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 20, 3272, 2, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 20, 3272, 3, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 20, 3272, 4, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 20, 3272, 5, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 21, 1, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 21, 2, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 21, 3, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 21, 4, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 3272, 21, 5, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 21, 3272, 1, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 21, 3272, 2, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 21, 3272, 3, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 21, 3272, 4, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(6976, 21, 3272, 5, 's', 4439, 0); +PERFORM Insert_pg_amop_temp(1977, 3272, 23, 1, 's', 405, 0); +PERFORM Insert_pg_amop_temp(1977, 23, 3272, 1, 's', 405, 0); +PERFORM Insert_pg_amop_temp(1977, 3272, 20, 1, 's', 405, 0); +PERFORM Insert_pg_amop_temp(1977, 20, 3272, 1, 's', 405, 0); +PERFORM Insert_pg_amop_temp(1977, 3272, 21, 1, 's', 405, 0); +PERFORM Insert_pg_amop_temp(1977, 21, 3272, 1, 's', 405, 0); +PERFORM Insert_pg_amop_temp(8646, 3272, 3272, 1, 's', 405, 0); DROP FUNCTION Insert_pg_amop_temp(); + +END IF; +END $upgrade$; \ No newline at end of file