By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,650 Members | 1,785 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,650 IT Pros & Developers. It's quick & easy.

scroll cursor bug or me?

P: n/a
Hi, I am hitting an issue when using SCROLL CURSORS.

-->My Setup:
PostgreSQL 8.0.3 on Windows XP Pro SP2
-->My Test Function:
CREATE OR REPLACE FUNCTION TestFunction () RETURNS varchar(50) AS
$$
DECLARE CursorProductGroups SCROLL CURSOR FOR SELECT * FROM TEST_TABLE;
BEGIN
RETURN NULL;
END;
$$
LANGUAGE plpgsql
;

-->psql spits back the following:

STORE_PHYSICAL_A=# \i test.sql
psql:test.sql:9: ERROR: syntax error at or near "CURSOR"
CONTEXT: invalid type name "SCROLL CURSOR FOR SELECT * FROM TEST_TABLE"
compile of PL/pgSQL function "testfunction" near line 1
STORE_PHYSICAL_A=#

This seems like a bug to me because my demo looks
just like the examples given in the PostgreSQL documentation. ie...

-- BEGIN POSTGRES DOC EXAMPLE
BEGIN WORK;
DECLARE liahona SCROLL CURSOR FOR SELECT * FROM films;
FETCH FORWARD 5 FROM liahona;
CLOSE liahona;
COMMIT WORK;
-- END POSTGRES DOC EXAMPLE

Any ideas?

Larry Morroni
Nov 23 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.