BUG #1850: parameter WITH HOLD (of function DECLARE CURSOR) not acepted inside CREATE FUNCTION. - Mailing list pgsql-bugs

From Danilo Barbosa
Subject BUG #1850: parameter WITH HOLD (of function DECLARE CURSOR) not acepted inside CREATE FUNCTION.
Date
Msg-id 20050826171222.CCD56F1557@svr2.postgresql.org
Whole thread Raw
Responses Re: BUG #1850: parameter WITH HOLD (of function DECLARE CURSOR)  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      1850
Logged by:          Danilo Barbosa
Email address:      dusb@airgate.com.br
PostgreSQL version: 8.1
Operating system:   LINUX
Description:        parameter WITH HOLD (of function DECLARE CURSOR) not
acepted inside CREATE FUNCTION.
Details:

CREATE OR REPLACE FUNCTION teste2()
  RETURNS refcursor AS
$BODY$DECLARE
    ref CURSOR WITH HOLD FOR SELECT * FROM tb_ponto;
BEGIN
    OPEN ref;
    RETURN ref;
END;$BODY$
  LANGUAGE 'plpgsql' VOLATILE;
ALTER FUNCTION teste2() OWNER TO aes_jacui;

The same DECLARE works outside the CREATE FUNCTION.

thank you!

pgsql-bugs by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Serialization errors on single threaded request
Next
From: "Steve Wormley"
Date:
Subject: BUG #1851: Performance reduction from 8.0.3