pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedPL/PgSQL FOR syntax
2+ messages / 2 participants
[nested] [flat]
* PL/PgSQL FOR syntax
@ 2001-02-16 18:31 Roberto Mello <rmello@cc.usu.edu>
2001-02-16 21:32 ` Re: PL/PgSQL FOR syntax Jie Liang <jliang@ipinc.com>
0 siblings, 1 reply; 2+ messages in thread
From: Roberto Mello @ 2001-02-16 18:31 UTC (permalink / raw)
To: pgsql-sql
Hi,
What's the correct syntax to access rows in a FOR loop? I'm writing
a PL/PgSQL doc and seem to be making a mistake somewhere.
I am referring to this:
[<<label>>]
FOR record | row IN select_clause LOOP
statements
END LOOP;
How do I access the rows within the for loop? row.field?
Thanks,
-Roberto
--
Computer Science Utah State University
Space Dynamics Laboratory Web Developer
USU Free Software & GNU/Linux Club http://fslc.usu.edu
My home page - http://www.brasileiro.net/roberto
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: PL/PgSQL FOR syntax
2001-02-16 18:31 PL/PgSQL FOR syntax Roberto Mello <rmello@cc.usu.edu>
@ 2001-02-16 21:32 ` Jie Liang <jliang@ipinc.com>
0 siblings, 0 replies; 2+ messages in thread
From: Jie Liang @ 2001-02-16 21:32 UTC (permalink / raw)
To: Roberto Mello <rmello@cc.usu.edu>; +Cc: pgsql-sql
Yes,
e.g.
declare
r record;
begin
for r in select statement loop
r.fieldname can fetch the result from the select statment row by row
Jie LIANG
St. Bernard Software
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
jliang@ipinc.com
www.stbernard.com
www.ipinc.com
On Fri, 16 Feb 2001, Roberto Mello wrote:
> Hi,
>
> What's the correct syntax to access rows in a FOR loop? I'm writing
> a PL/PgSQL doc and seem to be making a mistake somewhere.
> I am referring to this:
>
> [<<label>>]
> FOR record | row IN select_clause LOOP
> statements
> END LOOP;
>
> How do I access the rows within the for loop? row.field?
>
> Thanks,
>
> -Roberto
> --
> Computer Science Utah State University
> Space Dynamics Laboratory Web Developer
> USU Free Software & GNU/Linux Club http://fslc.usu.edu
> My home page - http://www.brasileiro.net/roberto
>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2001-02-16 21:32 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-02-16 18:31 PL/PgSQL FOR syntax Roberto Mello <rmello@cc.usu.edu>
2001-02-16 21:32 ` Jie Liang <jliang@ipinc.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