1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-22 23:02:54 +03:00

Rephrase 'Cannot insert into a view' and related messages, per

pghackers discussion around 31-Jul-02.
This commit is contained in:
Tom Lane 2002-08-29 06:05:27 +00:00
parent bf59ccc7d8
commit 8e80dbb849

View File

@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.106 2002/08/26 17:53:58 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.107 2002/08/29 06:05:27 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
@ -1237,13 +1237,16 @@ QueryRewrite(Query *parsetree)
switch (query->commandType) switch (query->commandType)
{ {
case CMD_INSERT: case CMD_INSERT:
elog(ERROR, "Cannot insert into a view without an appropriate rule"); elog(ERROR, "Cannot insert into a view"
"\n\tYou need an unconditional ON INSERT DO INSTEAD rule");
break; break;
case CMD_UPDATE: case CMD_UPDATE:
elog(ERROR, "Cannot update a view without an appropriate rule"); elog(ERROR, "Cannot update a view"
"\n\tYou need an unconditional ON UPDATE DO INSTEAD rule");
break; break;
case CMD_DELETE: case CMD_DELETE:
elog(ERROR, "Cannot delete from a view without an appropriate rule"); elog(ERROR, "Cannot delete from a view"
"\n\tYou need an unconditional ON DELETE DO INSTEAD rule");
break; break;
default: default:
elog(ERROR, "QueryRewrite: unexpected commandType %d", elog(ERROR, "QueryRewrite: unexpected commandType %d",