error in oracle to plpgsql documentation ?

From: Marc Cousin <cousinmarc(at)gmail(dot)com>
To: pgsql-docs(at)postgresql(dot)org
Subject: error in oracle to plpgsql documentation ?
Date: 2010-07-21 12:41:17
Message-ID: 201007211441.17678.cousinmarc@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
patch_plpgsql_example text/x-patch 773 bytes

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Andy Colson 2010-07-21 14:14:11 Re: Using more tha one index per table
Previous Message Scott Marlowe 2010-07-21 08:03:28 Re: Using more tha one index per table