We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc81d99 commit 426cafcCopy full SHA for 426cafc
src/backend/commands/typecmds.c
@@ -2046,7 +2046,7 @@ AlterDomainValidateConstraint(List *names, char *constrName)
2046
Relation conrel;
2047
HeapTuple tup;
2048
Form_pg_type typTup;
2049
- Form_pg_constraint con;
+ Form_pg_constraint con = NULL;
2050
Form_pg_constraint copy_con;
2051
char *conbin;
2052
SysScanDesc scan;
@@ -2094,13 +2094,10 @@ AlterDomainValidateConstraint(List *names, char *constrName)
2094
}
2095
2096
if (!found)
2097
- {
2098
- con = NULL; /* keep compiler quiet */
2099
ereport(ERROR,
2100
(errcode(ERRCODE_UNDEFINED_OBJECT),
2101
errmsg("constraint \"%s\" of domain \"%s\" does not exist",
2102
constrName, NameStr(con->conname))));
2103
- }
2104
2105
if (con->contype != CONSTRAINT_CHECK)
2106
0 commit comments