Re: PL/pgSQL CURSOR support

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>, "'Jan Wieck'" <JanWieck(at)Yahoo(dot)com>, PostgreSQL HACKERS <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PL/pgSQL CURSOR support
Date: 2001-05-30 14:45:48
Message-ID: 200105301445.f4UEjm312673@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Can someone comment on the use of FOR/IS in cursors?

[ Charset ISO-8859-1 unsupported, converting... ]
> >From SQL99 (Note: the 'FOR' keyword seems standard...):
>
> 14 Data manipulation
>
>
>
> 14.1 <declare cursor>
>
> Function
>
> Define a cursor.
>
> Format
>
> <declare cursor> ::=
> DECLARE <cursor name> [ <cursor sensitivity> ]
> [ <cursor scrollability> ] CURSOR
> [ <cursor holdability> ]
> [ <cursor returnability> ]
> FOR <cursor specification>
>
> <cursor sensitivity> ::=
> SENSITIVE
> | INSENSITIVE
> | ASENSITIVE
>
> <cursor scrollability> ::=
> SCROLL
> | NO SCROLL
>
> <cursor holdability> ::=
> WITH HOLD
> | WITHOUT HOLD
>
> <cursor returnability> ::=
> WITH RETURN
> | WITHOUT RETURN
>
> <cursor specification> ::=
> <query expression> [ <order by clause> ]
> [ <updatability clause> ]
>
> <updatability clause> ::=
> FOR { READ ONLY | UPDATE [ OF <column name list> ] }
>
> <order by clause> ::=
> ORDER BY <sort specification list>
>
> <sort specification list> ::=
> <sort specification> [ { <comma> <sort specification> }... ]
>
> <sort specification> ::=
> <sort key> [ <collate clause> ] [ <ordering specification> ]
>
> <sort key> ::=
> <value expression>
>
> <ordering specification> ::= ASC | DESC
>
> Chris
>
> > -----Original Message-----
> > From: pgsql-hackers-owner(at)postgresql(dot)org
> > [mailto:pgsql-hackers-owner(at)postgresql(dot)org]On Behalf Of Zeugswetter
> > Andreas SB
> > Sent: Tuesday, 22 May 2001 5:33 PM
> > To: 'Jan Wieck'; PostgreSQL HACKERS
> > Subject: AW: [HACKERS] PL/pgSQL CURSOR support
> >
> >
> >
> > > 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 ?
> > 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 ?
> >
> > Andreas
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 6: Have you searched our list archives?
> >
> > http://www.postgresql.org/search.mpl
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-05-30 14:49:32 Re: Unused pg_class columns
Previous Message Bruce Momjian 2001-05-30 14:43:36 Re: Unused pg_class columns