The following bug has been logged online:

Bug reference:      1850
Logged by:          Danilo Barbosa
Email address:      [EMAIL PROTECTED]
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!

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to