Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

scroll cursor bug or me?

Question posted by: Larry Morroni (Guest) on November 23rd, 2005 02:04 AM
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
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
 
Not the answer you were looking for? Post your question . . .
182,081 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors