Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit fcc20bd

Browse files
committed
Tweak new error messages to match the actual syntax of DECLARE CURSOR.
(Last night I copied-and-pasted from the WITH HOLD case, but that's wrong because of the bizarrely irregular syntax specified by the standard.)
1 parent 0e3ddc8 commit fcc20bd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/backend/executor/spi.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.182 2007/10/24 23:27:08 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.183 2007/10/25 13:48:57 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -994,7 +994,7 @@ SPI_cursor_open(const char *name, SPIPlanPtr plan,
994994
((PlannedStmt *) linitial(stmt_list))->rowMarks != NIL)
995995
ereport(ERROR,
996996
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
997-
errmsg("DECLARE CURSOR SCROLL ... FOR UPDATE/SHARE is not supported"),
997+
errmsg("DECLARE SCROLL CURSOR ... FOR UPDATE/SHARE is not supported"),
998998
errdetail("Scrollable cursors must be READ ONLY.")));
999999
}
10001000

src/backend/parser/analyze.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
1818
* Portions Copyright (c) 1994, Regents of the University of California
1919
*
20-
* $PostgreSQL: pgsql/src/backend/parser/analyze.c,v 1.368 2007/10/24 23:27:08 tgl Exp $
20+
* $PostgreSQL: pgsql/src/backend/parser/analyze.c,v 1.369 2007/10/25 13:48:57 tgl Exp $
2121
*
2222
*-------------------------------------------------------------------------
2323
*/
@@ -1627,14 +1627,14 @@ transformDeclareCursorStmt(ParseState *pstate, DeclareCursorStmt *stmt)
16271627
if (result->rowMarks != NIL && (stmt->options & CURSOR_OPT_SCROLL))
16281628
ereport(ERROR,
16291629
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
1630-
errmsg("DECLARE CURSOR SCROLL ... FOR UPDATE/SHARE is not supported"),
1630+
errmsg("DECLARE SCROLL CURSOR ... FOR UPDATE/SHARE is not supported"),
16311631
errdetail("Scrollable cursors must be READ ONLY.")));
16321632

16331633
/* FOR UPDATE and INSENSITIVE are not compatible */
16341634
if (result->rowMarks != NIL && (stmt->options & CURSOR_OPT_INSENSITIVE))
16351635
ereport(ERROR,
16361636
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
1637-
errmsg("DECLARE CURSOR INSENSITIVE ... FOR UPDATE/SHARE is not supported"),
1637+
errmsg("DECLARE INSENSITIVE CURSOR ... FOR UPDATE/SHARE is not supported"),
16381638
errdetail("Insensitive cursors must be READ ONLY.")));
16391639

16401640
/* We won't need the raw querytree any more */

0 commit comments

Comments
 (0)