Re: When is a record NULL?

From: "Eric B(dot) Ridge" <ebr(at)tcdi(dot)com>
To: David E(dot) Wheeler <david(at)kineticode(dot)com>
Cc: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: When is a record NULL?
Date: 2009-07-26 23:02:53
Message-ID: 114FE040-D9BD-4000-9A49-74F191C67A71@tcdi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jul 26, 2009, at 6:46 PM, David E. Wheeler wrote:

> Is there some way to get using_while() to properly return all the
> records?

I'm just a random lurker, but FOUND seems to work just fine (I suppose
it's PG-specific?).

http://www.postgresql.org/docs/8.1/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICS

BEGIN
OPEN stuff;
FETCH stuff INTO rec;
WHILE FOUND LOOP
RETURN NEXT rec;
FETCH stuff INTO rec;
END LOOP;
END;

HTH,

eric

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sam Mason 2009-07-26 23:26:56 Re: When is a record NULL?
Previous Message David E. Wheeler 2009-07-26 22:46:19 Re: When is a record NULL?