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

Commit52386df

Browse files
committed
DropErrorMsg() died with assert failure if try to drop a toast table...
mea culpa...
1 parentff0bca6 commit52386df

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

‎src/backend/tcop/utility.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.99 2000/11/05 22:50:21 vadim Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.100 2000/11/07 02:17:50 tgl Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -80,11 +80,14 @@ DropErrorMsg(char* relname, char wrongkind, char rightkind)
8080
for (wentry=kindstringarray;wentry->kind!='\0';wentry++)
8181
if (wentry->kind==wrongkind)
8282
break;
83-
Assert(wentry->kind!='\0');
84-
85-
elog(ERROR,"\"%s\" is not %s %s. Use DROP %s to remove %s %s",
86-
relname,rentry->indef_article,rentry->name,
87-
wentry->command,wentry->indef_article,wentry->name);
83+
/* wrongkind could be something we don't have in our table... */
84+
if (wentry->kind!='\0')
85+
elog(ERROR,"\"%s\" is not %s %s. Use DROP %s to remove %s %s",
86+
relname,rentry->indef_article,rentry->name,
87+
wentry->command,wentry->indef_article,wentry->name);
88+
else
89+
elog(ERROR,"\"%s\" is not %s %s",
90+
relname,rentry->indef_article,rentry->name);
8891
}
8992

9093
staticvoid

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp