Re: AW: PL/pgSQL CURSOR support

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
Cc: "'Jan Wieck'" <JanWieck(at)Yahoo(dot)com>, PostgreSQL HACKERS <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: AW: PL/pgSQL CURSOR support
Date: 2001-05-22 13:35:14
Message-ID: 200105221335.JAA01346@jupiter.jw.home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zeugswetter Andreas SB wrote:
>
> > Explicit cursor can be declared as:
> >
> > DECLARE
> > ...
> > curname CURSOR [(argname type [, ...])]
> > IS <select_stmt>;
>
> In esql you would have FOR instead of IS.
>
> DECLARE curname CURSOR ... FOR ....
>
> Thus the question, where is the syntax from ?

From the worlds most expens\b\b\b\b\b\b - er - reliable
commercial database system.

> There seems to be a standard for "the" SQL stored procedure language:
>
> "Persistent Stored Module definition of the ANSI SQL99 standard" (quote from DB/2)
> Anybody know this ?

The entire PL/pgSQL was written with some compatibility in
mind. Otherwise FOR loops would look more like

[ <<label>> ]
FOR <loop_name> AS
[ EACH ROW OF ] [ CURSOR <cursor_name> FOR ]
<cursor_specification> DO
<statements>
END FOR;

The good thing is that we can have any number of loadable
procedural languages. It's relatively easy to change the
PL/pgSQL parser and create some PL/SQL99 handler. As long as
the symbols in the modules don't conflict, I see no reason
why we shouldn't.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-05-22 13:52:19 Re: Grammar-problems with pl/pgsql in gram.y
Previous Message Jan Wieck 2001-05-22 13:01:56 Re: Re: AW: Plans for solving the VACUUM problem