Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd665162

Browse files
committed
Don't try to use a constraint name as domain name
The bug that caused this to be discovered is that the code was trying todereference a NULL or ill-defined pointer, as reported by Michael Mueller;but what it was doing was wrong anyway, per Heikki.This patch is Heikki's suggested fix.
1 parent9f08452 commitd665162

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/commands/typecmds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2096,13 +2096,13 @@ AlterDomainValidateConstraint(List *names, char *constrName)
20962096
ereport(ERROR,
20972097
(errcode(ERRCODE_UNDEFINED_OBJECT),
20982098
errmsg("constraint \"%s\" of domain \"%s\" does not exist",
2099-
constrName,NameStr(con->conname))));
2099+
constrName,TypeNameToString(typename))));
21002100

21012101
if (con->contype!=CONSTRAINT_CHECK)
21022102
ereport(ERROR,
21032103
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
21042104
errmsg("constraint \"%s\" of domain \"%s\" is not a check constraint",
2105-
constrName,NameStr(con->conname))));
2105+
constrName,TypeNameToString(typename))));
21062106

21072107
val=SysCacheGetAttr(CONSTROID,tuple,
21082108
Anum_pg_constraint_conbin,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp