!1986 修改问题: 初始化后,系统表pg_proc的provariadic为无效值

Merge pull request !1986 from 胡正超/procva
This commit is contained in:
opengauss-bot
2022-08-08 03:22:44 +00:00
committed by Gitee
13 changed files with 131 additions and 11 deletions

View File

@ -1992,7 +1992,9 @@ HeapTuple CreateHeapTuple4BuiltinFunc(const Builtin_func* func, TupleDesc desc)
} }
} }
} }
if (IsBootstrapProcessingMode()) {
variadicType = func->provariadic;
}
/* construct the spcified struct */ /* construct the spcified struct */
parameterTypes = buildoidvector(func->proargtypes.values, func->proargtypes.count); parameterTypes = buildoidvector(func->proargtypes.values, func->proargtypes.count);
defargpos = buildint2vector(func->prodefaultargpos->values, func->prodefaultargpos->count); defargpos = buildint2vector(func->prodefaultargpos->values, func->prodefaultargpos->count);

View File

@ -34,4 +34,4 @@ BEGIN
end if; end if;
exit; exit;
END LOOP; END LOOP;
END$$; END$$;

View File

@ -0,0 +1,22 @@
update pg_proc set provariadic = 0 where oid = 3058;
update pg_proc set provariadic = 0 where oid = 3059;
update pg_proc set provariadic = 0 where oid = 3239;
update pg_proc set provariadic = 0 where oid = 3261;
update pg_proc set provariadic = 0 where oid = 3262;
update pg_proc set provariadic = 0 where oid = 3264;
update pg_proc set provariadic = 0 where oid = 3425;
update pg_proc set provariadic = 0 where oid = 3426;
update pg_proc set provariadic = 0 where oid = 3539;
update pg_proc set provariadic = 0 where oid = 4216;
update pg_proc set provariadic = 0 where oid = 4217;
update pg_proc set provariadic = 0 where oid = 4218;
update pg_proc set provariadic = 0 where oid = 4219;
update pg_proc set provariadic = 0 where oid = 4978;
update pg_proc set provariadic = 0 where oid = 7101;
update pg_proc set provariadic = 0 where oid = 7102;
update pg_proc set provariadic = 0 where oid = 7103;
update pg_proc set provariadic = 0 where oid = 7105;
update pg_proc set provariadic = 0 where oid = 7106;
update pg_proc set provariadic = 0 where oid = 7107;
update pg_proc set provariadic = 0 where oid = 7108;
update pg_proc set provariadic = 0 where oid = 7109;

View File

@ -34,4 +34,4 @@ BEGIN
end if; end if;
exit; exit;
END LOOP; END LOOP;
END$$; END$$;

View File

@ -0,0 +1,22 @@
update pg_proc set provariadic = 0 where oid = 3058;
update pg_proc set provariadic = 0 where oid = 3059;
update pg_proc set provariadic = 0 where oid = 3239;
update pg_proc set provariadic = 0 where oid = 3261;
update pg_proc set provariadic = 0 where oid = 3262;
update pg_proc set provariadic = 0 where oid = 3264;
update pg_proc set provariadic = 0 where oid = 3425;
update pg_proc set provariadic = 0 where oid = 3426;
update pg_proc set provariadic = 0 where oid = 3539;
update pg_proc set provariadic = 0 where oid = 4216;
update pg_proc set provariadic = 0 where oid = 4217;
update pg_proc set provariadic = 0 where oid = 4218;
update pg_proc set provariadic = 0 where oid = 4219;
update pg_proc set provariadic = 0 where oid = 4978;
update pg_proc set provariadic = 0 where oid = 7101;
update pg_proc set provariadic = 0 where oid = 7102;
update pg_proc set provariadic = 0 where oid = 7103;
update pg_proc set provariadic = 0 where oid = 7105;
update pg_proc set provariadic = 0 where oid = 7106;
update pg_proc set provariadic = 0 where oid = 7107;
update pg_proc set provariadic = 0 where oid = 7108;
update pg_proc set provariadic = 0 where oid = 7109;

View File

@ -28,4 +28,4 @@ CREATE OR REPLACE FUNCTION pg_catalog.pg_get_replica_identity_index(regclass)
returns oid returns oid
LANGUAGE internal LANGUAGE internal
STABLE STRICT NOT FENCED STABLE STRICT NOT FENCED
AS $function$pg_get_replica_identity_index$function$; AS $function$pg_get_replica_identity_index$function$;

View File

@ -0,0 +1,22 @@
update pg_proc set provariadic = 2276 where oid = 3058;
update pg_proc set provariadic = 2276 where oid = 3059;
update pg_proc set provariadic = 2276 where oid = 3239;
update pg_proc set provariadic = 2276 where oid = 3261;
update pg_proc set provariadic = 25 where oid = 3262;
update pg_proc set provariadic = 25 where oid = 3264;
update pg_proc set provariadic = 25 where oid = 3425;
update pg_proc set provariadic = 25 where oid = 3426;
update pg_proc set provariadic = 2276 where oid = 3539;
update pg_proc set provariadic = 25 where oid = 4216;
update pg_proc set provariadic = 25 where oid = 4217;
update pg_proc set provariadic = 25 where oid = 4218;
update pg_proc set provariadic = 25 where oid = 4219;
update pg_proc set provariadic = 25 where oid = 4978;
update pg_proc set provariadic = 2276 where oid = 7101;
update pg_proc set provariadic = 2276 where oid = 7102;
update pg_proc set provariadic = 2276 where oid = 7103;
update pg_proc set provariadic = 2276 where oid = 7105;
update pg_proc set provariadic = 2276 where oid = 7106;
update pg_proc set provariadic = 2276 where oid = 7107;
update pg_proc set provariadic = 2276 where oid = 7108;
update pg_proc set provariadic = 2276 where oid = 7109;

View File

@ -28,4 +28,4 @@ CREATE OR REPLACE FUNCTION pg_catalog.pg_get_replica_identity_index(regclass)
returns oid returns oid
LANGUAGE internal LANGUAGE internal
STABLE STRICT NOT FENCED STABLE STRICT NOT FENCED
AS $function$pg_get_replica_identity_index$function$; AS $function$pg_get_replica_identity_index$function$;

View File

@ -0,0 +1,22 @@
update pg_proc set provariadic = 2276 where oid = 3058;
update pg_proc set provariadic = 2276 where oid = 3059;
update pg_proc set provariadic = 2276 where oid = 3239;
update pg_proc set provariadic = 2276 where oid = 3261;
update pg_proc set provariadic = 25 where oid = 3262;
update pg_proc set provariadic = 25 where oid = 3264;
update pg_proc set provariadic = 25 where oid = 3425;
update pg_proc set provariadic = 25 where oid = 3426;
update pg_proc set provariadic = 2276 where oid = 3539;
update pg_proc set provariadic = 25 where oid = 4216;
update pg_proc set provariadic = 25 where oid = 4217;
update pg_proc set provariadic = 25 where oid = 4218;
update pg_proc set provariadic = 25 where oid = 4219;
update pg_proc set provariadic = 25 where oid = 4978;
update pg_proc set provariadic = 2276 where oid = 7101;
update pg_proc set provariadic = 2276 where oid = 7102;
update pg_proc set provariadic = 2276 where oid = 7103;
update pg_proc set provariadic = 2276 where oid = 7105;
update pg_proc set provariadic = 2276 where oid = 7106;
update pg_proc set provariadic = 2276 where oid = 7107;
update pg_proc set provariadic = 2276 where oid = 7108;
update pg_proc set provariadic = 2276 where oid = 7109;

View File

@ -24,14 +24,14 @@ select oid,* from pg_proc where proname like '%json%' order by oid;
3155 | row_to_json | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | s | 1 | 0 | 114 | 2249 | | | | | row_to_json | | | | | f | | f | f | | 0 | f | | | 2249 | 3155 | row_to_json | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | s | 1 | 0 | 114 | 2249 | | | | | row_to_json | | | | | f | | f | f | | 0 | f | | | 2249 |
3156 | row_to_json | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | s | 2 | 0 | 114 | 2249 16 | | | | | row_to_json_pretty | | | | | f | | f | f | | 0 | f | | | 2249 16 | 3156 | row_to_json | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | s | 2 | 0 | 114 | 2249 16 | | | | | row_to_json_pretty | | | | | f | | f | f | | 0 | f | | | 2249 16 |
3238 | json_build_array | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | f | f | i | 0 | 0 | 114 | | | | | | json_build_array_noargs | | | | | f | f | f | f | | 0 | f | | | | 3238 | json_build_array | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | f | f | i | 0 | 0 | 114 | | | | | | json_build_array_noargs | | | | | f | f | f | f | | 0 | f | | | |
3239 | json_build_array | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | f | f | i | 1 | 0 | 114 | 2276 | {2276} | {v} | | | json_build_array | | | | | f | f | f | f | | 0 | f | | | 2276 | 3239 | json_build_array | 11 | 10 | 12 | 1 | 0 | 2276 | - | f | f | f | f | f | f | i | 1 | 0 | 114 | 2276 | {2276} | {v} | | | json_build_array | | | | | f | f | f | f | | 0 | f | | | 2276 |
3258 | json_each | 11 | 10 | 12 | 1 | 100 | 0 | - | f | f | f | f | t | t | i | 1 | 0 | 2249 | 114 | {114,25,114} | {i,o,o} | {from_json,key,value} | | json_each | | | | | f | f | f | f | | 0 | f | | | 114 25 114 | 3258 | json_each | 11 | 10 | 12 | 1 | 100 | 0 | - | f | f | f | f | t | t | i | 1 | 0 | 2249 | 114 | {114,25,114} | {i,o,o} | {from_json,key,value} | | json_each | | | | | f | f | f | f | | 0 | f | | | 114 25 114 |
3259 | json_each_text | 11 | 10 | 12 | 1 | 100 | 0 | - | f | f | f | f | t | t | i | 1 | 0 | 2249 | 114 | {114,25,25} | {i,o,o} | {from_json,key,value} | | json_each_text | | | | | f | f | f | f | | 0 | f | | | 114 25 25 | 3259 | json_each_text | 11 | 10 | 12 | 1 | 100 | 0 | - | f | f | f | f | t | t | i | 1 | 0 | 2249 | 114 | {114,25,25} | {i,o,o} | {from_json,key,value} | | json_each_text | | | | | f | f | f | f | | 0 | f | | | 114 25 25 |
3260 | json_build_object | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | f | f | i | 0 | 0 | 114 | | | | | | json_build_object_noargs | | | | | f | f | f | f | | 0 | f | | | | 3260 | json_build_object | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | f | f | i | 0 | 0 | 114 | | | | | | json_build_object_noargs | | | | | f | f | f | f | | 0 | f | | | |
3261 | json_build_object | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | f | f | i | 1 | 0 | 114 | 2276 | {2276} | {v} | | | json_build_object | | | | | f | f | f | f | | 0 | f | | | 2276 | 3261 | json_build_object | 11 | 10 | 12 | 1 | 0 | 2276 | - | f | f | f | f | f | f | i | 1 | 0 | 114 | 2276 | {2276} | {v} | | | json_build_object | | | | | f | f | f | f | | 0 | f | | | 2276 |
3262 | json_extract_path | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 114 | 114 1009 | {114,1009} | {i,v} | | | json_extract_path | | | | | f | f | f | f | | 0 | f | | | 114 1009 | 3262 | json_extract_path | 11 | 10 | 12 | 1 | 0 | 25 | - | f | f | f | f | t | f | i | 2 | 0 | 114 | 114 1009 | {114,1009} | {i,v} | | | json_extract_path | | | | | f | f | f | f | | 0 | f | | | 114 1009 |
3263 | json_extract_path_op | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 114 | 114 1009 | | | | | json_extract_path | | | | | f | f | f | f | | 0 | f | | | 114 1009 | 3263 | json_extract_path_op | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 114 | 114 1009 | | | | | json_extract_path | | | | | f | f | f | f | | 0 | f | | | 114 1009 |
3264 | json_extract_path_text | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 25 | 114 1009 | {114,1009} | {i,v} | | | json_extract_path_text | | | | | f | f | f | f | | 0 | f | | | 114 1009 | 3264 | json_extract_path_text | 11 | 10 | 12 | 1 | 0 | 25 | - | f | f | f | f | t | f | i | 2 | 0 | 25 | 114 1009 | {114,1009} | {i,v} | | | json_extract_path_text | | | | | f | f | f | f | | 0 | f | | | 114 1009 |
3270 | json_typeof | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 1 | 0 | 25 | 114 | | | | | json_typeof | | | | | f | f | f | f | | 0 | f | | | 114 | 3270 | json_typeof | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 1 | 0 | 25 | 114 | | | | | json_typeof | | | | | f | f | f | f | | 0 | f | | | 114 |
3318 | json_extract_path_text_op | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 25 | 114 1009 | | | | | json_extract_path_text | | | | | f | f | f | f | | 0 | f | | | 114 1009 | 3318 | json_extract_path_text_op | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 25 | 114 1009 | | | | | json_extract_path_text | | | | | f | f | f | f | | 0 | f | | | 114 1009 |
3319 | jsonb_extract_path_op | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 3802 | 3802 1009 | | | | | jsonb_extract_path | | | | | f | f | f | f | | 0 | f | | | 3802 1009 | 3319 | jsonb_extract_path_op | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 3802 | 3802 1009 | | | | | jsonb_extract_path | | | | | f | f | f | f | | 0 | f | | | 3802 1009 |
@ -59,8 +59,8 @@ select oid,* from pg_proc where proname like '%json%' order by oid;
3422 | jsonb_exists | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 16 | 3802 25 | | | | | jsonb_exists | | | | | f | f | f | f | | 0 | f | | | 3802 25 | 3422 | jsonb_exists | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 16 | 3802 25 | | | | | jsonb_exists | | | | | f | f | f | f | | 0 | f | | | 3802 25 |
3423 | jsonb_exists_all | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 16 | 3802 1009 | | | | | jsonb_exists_all | | | | | f | f | f | f | | 0 | f | | | 3802 1009 | 3423 | jsonb_exists_all | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 16 | 3802 1009 | | | | | jsonb_exists_all | | | | | f | f | f | f | | 0 | f | | | 3802 1009 |
3424 | jsonb_exists_any | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 16 | 3802 1009 | | | | | jsonb_exists_any | | | | | f | f | f | f | | 0 | f | | | 3802 1009 | 3424 | jsonb_exists_any | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 16 | 3802 1009 | | | | | jsonb_exists_any | | | | | f | f | f | f | | 0 | f | | | 3802 1009 |
3425 | jsonb_extract_path | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 3802 | 3802 1009 | {3802,1009} | {i,v} | | | jsonb_extract_path | | | | | f | f | f | f | | 0 | f | | | 3802 1009 | 3425 | jsonb_extract_path | 11 | 10 | 12 | 1 | 0 | 25 | - | f | f | f | f | t | f | i | 2 | 0 | 3802 | 3802 1009 | {3802,1009} | {i,v} | | | jsonb_extract_path | | | | | f | f | f | f | | 0 | f | | | 3802 1009 |
3426 | jsonb_extract_path_text | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 25 | 3802 1009 | {3802,1009} | {i,v} | | | jsonb_extract_path_text | | | | | f | f | f | f | | 0 | f | | | 3802 1009 | 3426 | jsonb_extract_path_text | 11 | 10 | 12 | 1 | 0 | 25 | - | f | f | f | f | t | f | i | 2 | 0 | 25 | 3802 1009 | {3802,1009} | {i,v} | | | jsonb_extract_path_text | | | | | f | f | f | f | | 0 | f | | | 3802 1009 |
3427 | jsonb_extract_path_text_op | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 25 | 3802 1009 | | | | | jsonb_extract_path_text | | | | | f | f | f | f | | 0 | f | | | 3802 1009 | 3427 | jsonb_extract_path_text_op | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 25 | 3802 1009 | | | | | jsonb_extract_path_text | | | | | f | f | f | f | | 0 | f | | | 3802 1009 |
3428 | jsonb_ge | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 16 | 3802 3802 | | | | | jsonb_ge | | | | | f | f | f | f | | 0 | f | | | 3802 3802 | 3428 | jsonb_ge | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 16 | 3802 3802 | | | | | jsonb_ge | | | | | f | f | f | f | | 0 | f | | | 3802 3802 |
3429 | jsonb_gt | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 16 | 3802 3802 | | | | | jsonb_gt | | | | | f | f | f | f | | 0 | f | | | 3802 3802 | 3429 | jsonb_gt | 11 | 10 | 12 | 1 | 0 | 0 | - | f | f | f | f | t | f | i | 2 | 0 | 16 | 3802 3802 | | | | | jsonb_gt | | | | | f | f | f | f | | 0 | f | | | 3802 3802 |

View File

@ -0,0 +1 @@
select provariadic,oid, proname from pg_proc where arraycontains(proargmodes::char[],ARRAY['v'::char]) order by oid;

View File

@ -0,0 +1,27 @@
select provariadic,oid, proname from pg_proc where arraycontains(proargmodes::char[],ARRAY['v'::char]) order by oid;
provariadic | oid | proname
-------------+------+-------------------------------------
2276 | 3058 | concat
2276 | 3059 | concat_ws
2276 | 3239 | json_build_array
2276 | 3261 | json_build_object
25 | 3262 | json_extract_path
25 | 3264 | json_extract_path_text
25 | 3425 | jsonb_extract_path
25 | 3426 | jsonb_extract_path_text
2276 | 3539 | format
25 | 4216 | pg_logical_slot_get_changes
25 | 4217 | pg_logical_slot_get_binary_changes
25 | 4218 | pg_logical_slot_peek_changes
25 | 4219 | pg_logical_slot_peek_binary_changes
25 | 4978 | pg_logical_get_area_changes
2276 | 7101 | db4ai_predict_by_bool
2276 | 7102 | db4ai_predict_by_int32
2276 | 7103 | db4ai_predict_by_int64
2276 | 7105 | db4ai_predict_by_float4
2276 | 7106 | db4ai_predict_by_float8
2276 | 7107 | db4ai_predict_by_numeric
2276 | 7108 | db4ai_predict_by_text
2276 | 7109 | db4ai_predict_by_float8_array
(22 rows)

View File

@ -10,6 +10,8 @@ test: hw_grant_package gsc_func gsc_db
test: uppercase_attribute_name decode_compatible_with_o test: uppercase_attribute_name decode_compatible_with_o
test: replace_func_with_two_args trunc_func_for_date nlssort_pinyin updatable_views test: replace_func_with_two_args trunc_func_for_date nlssort_pinyin updatable_views
test: pg_proc_test
# parse xlog and page # parse xlog and page
test: parse_page test: parse_page
test: parse_xlog test: parse_xlog