Connecting Tech Pros Worldwide Help | Site Map

scroll cursor bug or me?

  #1  
Old November 23rd, 2005, 03:04 AM
Larry Morroni
Guest
 
Posts: 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
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
can't set mouse cursor Andy Baxter answers 1 May 31st, 2006 10:05 AM
.NET editor BUG Sanjay answers 1 November 22nd, 2005 03:33 PM
.NET editor BUG Sanjay answers 1 July 21st, 2005 07:37 PM
scroll bug cursor or me? Larry Morroni answers 0 July 19th, 2005 11:28 PM