pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feederror in oracle to plpgsql documentation ?
3+ messages / 3 participants
[nested] [flat]
* error in oracle to plpgsql documentation ?
@ 2010-07-21 12:41 Marc Cousin <cousinmarc@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Marc Cousin @ 2010-07-21 12:41 UTC (permalink / raw)
To: 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)
Attachments:
patch_plpgsql_example (text/x-patch, 772B) download
diff -r -c postgresql-orig/doc/src/sgml/plpgsql.sgml postgresql/doc/src/sgml/plpgsql.sgml
*** postgresql-orig/doc/src/sgml/plpgsql.sgml 2010-07-21 14:36:14.208439968 +0200
--- postgresql/doc/src/sgml/plpgsql.sgml 2010-07-21 14:37:13.921785739 +0200
***************
*** 4279,4285 ****
<programlisting>
CREATE OR REPLACE FUNCTION cs_update_referrer_type_proc() RETURNS void AS $func$
DECLARE
! CURSOR referrer_keys IS
SELECT * FROM cs_referrer_keys
ORDER BY try_order;
func_body text;
--- 4279,4285 ----
<programlisting>
CREATE OR REPLACE FUNCTION cs_update_referrer_type_proc() RETURNS void AS $func$
DECLARE
! referrer_keys CURSOR IS
SELECT * FROM cs_referrer_keys
ORDER BY try_order;
func_body text;
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: error in oracle to plpgsql documentation ?
@ 2010-07-21 17:07 Kevin Grittner <Kevin.Grittner@wicourts.gov>
parent: Marc Cousin <cousinmarc@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Grittner @ 2010-07-21 17:07 UTC (permalink / raw)
To: Marc Cousin <cousinmarc@gmail.com>; pgsql-docs
Marc Cousin <cousinmarc@gmail.com> 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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: error in oracle to plpgsql documentation ?
@ 2010-07-27 20:02 Robert Haas <robertmhaas@gmail.com>
parent: Kevin Grittner <Kevin.Grittner@wicourts.gov>
0 siblings, 0 replies; 3+ messages in thread
From: Robert Haas @ 2010-07-27 20:02 UTC (permalink / raw)
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; +Cc: Marc Cousin <cousinmarc@gmail.com>; pgsql-docs
On Wed, Jul 21, 2010 at 1:07 PM, Kevin Grittner
<Kevin.Grittner@wicourts.gov> wrote:
> Marc Cousin <cousinmarc@gmail.com> 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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2010-07-27 20:02 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-07-21 12:41 error in oracle to plpgsql documentation ? Marc Cousin <cousinmarc@gmail.com>
2010-07-21 17:07 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2010-07-27 20:02 ` Robert Haas <robertmhaas@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox