470,581 Members | 2,357 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,581 developers. It's quick & easy.

scroll bug cursor or me?

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
Jul 19 '05 #1
0 1638

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Totte Karlsson | last post: by
3 posts views Thread by Rob T | last post: by
reply views Thread by Larry Morroni | last post: by
1 post views Thread by Mike Green | last post: by
1 post views Thread by id86 | last post: by
4 posts views Thread by wolverine | last post: by
1 post views Thread by livre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.