修改了一些代码问题

This commit is contained in:
徐鲲鹏
2020-09-03 17:05:23 +08:00
committed by Gitee
parent c03ad30465
commit 55676a7d12

View File

@ -98,7 +98,7 @@ static const int PRO_RETURN_SET_COST = 1000;
* validator, so as not to produce a NOTICE and then an ERROR for the same
* condition.)
*/
static void CheckIsSerialType(TypeName* t)
static void CheckIsSerialType(TypeName* t)
{
bool isSerial = false;
/* Check for SERIAL pseudo-types */
@ -144,7 +144,7 @@ static void compute_return_type(
* namespace, if the owner of the namespce has the same name as the namescpe
*/
bool isalter = false;
CheckIsSerialType(returnType);
typtup = LookupTypeName(NULL, returnType, NULL);
@ -287,6 +287,17 @@ static void examine_parameter_list(List* parameters, Oid languageOid, const char
CheckIsSerialType(t);
typtup = LookupTypeName(NULL, t, NULL);
/*
* If the type is relation, then we check
* whether the table is in installation group
*/
if (!in_logic_cluster() && !IsTypeTableInInstallationGroup(typtup)) {
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("argument type '%s' must be in installation group", TypeNameToString(t))));
}
if (typtup) {
if (!((Form_pg_type)GETSTRUCT(typtup))->typisdefined) {
/* As above, hard error if language is SQL */