Re: count of query results in for loop

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Sim Zacks *EXTERN*" <sim(at)compulab(dot)co(dot)il>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: count of query results in for loop
Date: 2009-07-28 12:12:24
Message-ID: D960CB61B694CF459DCFB4B0128514C203937E79@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sim Zacks wrote:
> Is there any way to (without a separate count query first) to know the
> number of rows returned in a:
>
> for x in select ... Loop
>
> ...
>
> End Loop
>
> structure?

No. Not before you exit the loop.

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bill Moran 2009-07-28 12:33:31 Re: Video available for PGDay SJC '09
Previous Message Terry Lee Tucker 2009-07-28 09:48:13 Re: C Function Question