|
|
@ -1626,18 +1626,18 @@ DropCastById(Oid castOid) |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
void |
|
|
|
void |
|
|
|
IsThereFunctionInNamespace(const char *proname, int pronargs, |
|
|
|
IsThereFunctionInNamespace(const char *proname, int pronargs, |
|
|
|
oidvector proargtypes, Oid nspOid) |
|
|
|
oidvector *proargtypes, Oid nspOid) |
|
|
|
{ |
|
|
|
{ |
|
|
|
/* check for duplicate name (more friendly than unique-index failure) */ |
|
|
|
/* check for duplicate name (more friendly than unique-index failure) */ |
|
|
|
if (SearchSysCacheExists3(PROCNAMEARGSNSP, |
|
|
|
if (SearchSysCacheExists3(PROCNAMEARGSNSP, |
|
|
|
CStringGetDatum(proname), |
|
|
|
CStringGetDatum(proname), |
|
|
|
PointerGetDatum(&proargtypes), |
|
|
|
PointerGetDatum(proargtypes), |
|
|
|
ObjectIdGetDatum(nspOid))) |
|
|
|
ObjectIdGetDatum(nspOid))) |
|
|
|
ereport(ERROR, |
|
|
|
ereport(ERROR, |
|
|
|
(errcode(ERRCODE_DUPLICATE_FUNCTION), |
|
|
|
(errcode(ERRCODE_DUPLICATE_FUNCTION), |
|
|
|
errmsg("function %s already exists in schema \"%s\"", |
|
|
|
errmsg("function %s already exists in schema \"%s\"", |
|
|
|
funcname_signature_string(proname, pronargs, |
|
|
|
funcname_signature_string(proname, pronargs, |
|
|
|
NIL, proargtypes.values), |
|
|
|
NIL, proargtypes->values), |
|
|
|
get_namespace_name(nspOid)))); |
|
|
|
get_namespace_name(nspOid)))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|