Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 52386df

Browse files
committed
DropErrorMsg() died with assert failure if try to drop a toast table...
mea culpa...
1 parent ff0bca6 commit 52386df

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
static void

0 commit comments

Comments
 (0)