1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-01 01:04:50 +03:00

Give a more intelligible and useful error message for SELECT with no

destination in plpgsql.
This commit is contained in:
Tom Lane 2001-11-13 02:05:27 +00:00
parent 330b112476
commit 1c2d2dbb67

View File

@ -3,7 +3,7 @@
* procedural language * procedural language
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.50 2001/11/08 20:37:52 momjian Exp $ * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.51 2001/11/13 02:05:27 tgl Exp $
* *
* This software is copyrighted by Jan Wieck - Hamburg. * This software is copyrighted by Jan Wieck - Hamburg.
* *
@ -2045,7 +2045,8 @@ exec_stmt_execsql(PLpgSQL_execstate * estate,
break; break;
case SPI_OK_SELECT: case SPI_OK_SELECT:
elog(ERROR, "unexpected SELECT query in exec_stmt_execsql()"); elog(ERROR, "SELECT query has no destination for result data."
"\n\tIf you want to discard the results, use PERFORM instead.");
default: default:
elog(ERROR, "error executing query \"%s\"", elog(ERROR, "error executing query \"%s\"",