1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-12 21:01:52 +03:00

DropErrorMsg() died with assert failure if try to drop a toast table...

mea culpa...
This commit is contained in:
Tom Lane
2000-11-07 02:17:50 +00:00
parent ff0bca613f
commit 52386df4b9

View File

@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.99 2000/11/05 22:50:21 vadim Exp $ * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.100 2000/11/07 02:17:50 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -80,11 +80,14 @@ DropErrorMsg(char* relname, char wrongkind, char rightkind)
for (wentry = kindstringarray; wentry->kind != '\0'; wentry++) for (wentry = kindstringarray; wentry->kind != '\0'; wentry++)
if (wentry->kind == wrongkind) if (wentry->kind == wrongkind)
break; break;
Assert(wentry->kind != '\0'); /* wrongkind could be something we don't have in our table... */
if (wentry->kind != '\0')
elog(ERROR, "\"%s\" is not %s %s. Use DROP %s to remove %s %s", elog(ERROR, "\"%s\" is not %s %s. Use DROP %s to remove %s %s",
relname, rentry->indef_article, rentry->name, relname, rentry->indef_article, rentry->name,
wentry->command, wentry->indef_article, wentry->name); wentry->command, wentry->indef_article, wentry->name);
else
elog(ERROR, "\"%s\" is not %s %s",
relname, rentry->indef_article, rentry->name);
} }
static void static void