Commit 8e80dbb8 authored by Tom Lane's avatar Tom Lane

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

pghackers discussion around 31-Jul-02.
parent bf59ccc7
...@@ -7,7 +7,7 @@ ...@@ -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) ...@@ -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",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment