diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-11-13 02:05:27 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-11-13 02:05:27 +0000 |
commit | 1c2d2dbb67720e7e037aa517844397f07b90aaab (patch) | |
tree | 9b761740d3ac07db1cf87d329b5d39ee43e70f98 /src | |
parent | 330b11247613c6533356e194c6be92e557a6441a (diff) | |
download | postgresql-1c2d2dbb67720e7e037aa517844397f07b90aaab.tar.gz postgresql-1c2d2dbb67720e7e037aa517844397f07b90aaab.zip |
Give a more intelligible and useful error message for SELECT with no
destination in plpgsql.
Diffstat (limited to 'src')
-rw-r--r-- | src/pl/plpgsql/src/pl_exec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index bbacd36598e..5f2d58f4dd9 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -3,7 +3,7 @@ * procedural language * * 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. * @@ -2045,7 +2045,8 @@ exec_stmt_execsql(PLpgSQL_execstate * estate, break; 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: elog(ERROR, "error executing query \"%s\"", |