mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
Don't pass oidvector by value.
Since the structure ends with a flexible array, doing so truncates any vector having more than one element. New in 9.3, so no back-patch.
This commit is contained in:
@ -1626,18 +1626,18 @@ DropCastById(Oid castOid)
|
||||
*/
|
||||
void
|
||||
IsThereFunctionInNamespace(const char *proname, int pronargs,
|
||||
oidvector proargtypes, Oid nspOid)
|
||||
oidvector *proargtypes, Oid nspOid)
|
||||
{
|
||||
/* check for duplicate name (more friendly than unique-index failure) */
|
||||
if (SearchSysCacheExists3(PROCNAMEARGSNSP,
|
||||
CStringGetDatum(proname),
|
||||
PointerGetDatum(&proargtypes),
|
||||
PointerGetDatum(proargtypes),
|
||||
ObjectIdGetDatum(nspOid)))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_DUPLICATE_FUNCTION),
|
||||
errmsg("function %s already exists in schema \"%s\"",
|
||||
funcname_signature_string(proname, pronargs,
|
||||
NIL, proargtypes.values),
|
||||
NIL, proargtypes->values),
|
||||
get_namespace_name(nspOid))));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user