mirror of
https://github.com/postgres/postgres.git
synced 2025-05-20 00:03:14 -04:00
Suppress compiler warning about potentially uninitialized variable.
Maybe some compilers are smart enough to not complain about the previous coding ... but mine isn't.
This commit is contained in:
parent
cc81d9969c
commit
426cafc46c
@ -2046,7 +2046,7 @@ AlterDomainValidateConstraint(List *names, char *constrName)
|
|||||||
Relation conrel;
|
Relation conrel;
|
||||||
HeapTuple tup;
|
HeapTuple tup;
|
||||||
Form_pg_type typTup;
|
Form_pg_type typTup;
|
||||||
Form_pg_constraint con;
|
Form_pg_constraint con = NULL;
|
||||||
Form_pg_constraint copy_con;
|
Form_pg_constraint copy_con;
|
||||||
char *conbin;
|
char *conbin;
|
||||||
SysScanDesc scan;
|
SysScanDesc scan;
|
||||||
@ -2094,13 +2094,10 @@ AlterDomainValidateConstraint(List *names, char *constrName)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!found)
|
if (!found)
|
||||||
{
|
|
||||||
con = NULL; /* keep compiler quiet */
|
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_UNDEFINED_OBJECT),
|
(errcode(ERRCODE_UNDEFINED_OBJECT),
|
||||||
errmsg("constraint \"%s\" of domain \"%s\" does not exist",
|
errmsg("constraint \"%s\" of domain \"%s\" does not exist",
|
||||||
constrName, NameStr(con->conname))));
|
constrName, NameStr(con->conname))));
|
||||||
}
|
|
||||||
|
|
||||||
if (con->contype != CONSTRAINT_CHECK)
|
if (con->contype != CONSTRAINT_CHECK)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user