error in oracle to plpgsql documentation ? - Mailing list pgsql-docs

From Marc Cousin
Subject error in oracle to plpgsql documentation ?
Date
Msg-id 201007211441.17678.cousinmarc@gmail.com
Whole thread Raw
Responses Re: error in oracle to plpgsql documentation ?  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-docs
Hi,

A user had a syntax problem with a cursor declaration. After a bit of digging,
the code he used came directly from the documentation :

DECLARE
    CURSOR referrer_keys IS
        SELECT * FROM cs_referrer_keys
        ORDER BY try_order;
    func_body text;
    func_cmd text;

I guess it should be

DECLARE
    referrer_keys CURSOR IS
        SELECT * FROM cs_referrer_keys
        ORDER BY try_order;
    func_body text;
    func_cmd text;

(syntax is inverted in Oracle, so I guess it is a typo ?)

If I'm right, a patch is attached (the code works with the correction)



Attachment

pgsql-docs by date:

Previous
From: Daniele Varrazzo
Date:
Subject: Re: Please provide stable target anchors
Next
From: "Kevin Grittner"
Date:
Subject: Re: error in oracle to plpgsql documentation ?