error in oracle to plpgsql documentation ?

Поиск
Список
Период
Сортировка
Искать

error in oracle to plpgsql documentation ?

От:
Marc Cousin <cousinmarc@gmail.com>
Дата:
Вложения:
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)


Re: error in oracle to plpgsql documentation ?

От:
"Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Дата:
Marc Cousin  wrote:
 
> DECLARE
>     CURSOR referrer_keys IS
 
> I guess it should be
> 
> DECLARE
>     referrer_keys CURSOR IS
 
> If I'm right, a patch is attached (the code works with the
> correction)
 
The patch looks correct to me.
 
-Kevin

Re: error in oracle to plpgsql documentation ?

От:
Robert Haas <robertmhaas@gmail.com>
Дата:
On Wed, Jul 21, 2010 at 1:07 PM, Kevin Grittner
 wrote:
> Marc Cousin  wrote:
>
>> DECLARE
>>     CURSOR referrer_keys IS
>
>> I guess it should be
>>
>> DECLARE
>>     referrer_keys CURSOR IS
>
>> If I'm right, a patch is attached (the code works with the
>> correction)
>
> The patch looks correct to me.

Committed.  I back-patched this as far as 8.4 so that the web site
docs will get updated, but it didn't seem important enough to go back
further.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company
FAQ