Re: When is a record NULL?

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Eric B(dot) Ridge <ebr(at)tcdi(dot)com>
Cc: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: When is a record NULL?
Date: 2009-07-28 00:19:44
Message-ID: 5BE64390-BB4B-4FCC-B3CF-4853471429D3@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jul 26, 2009, at 4:02 PM, Eric B. Ridge wrote:

> 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;

Yep, that's just what I needed, thanks. I think I'll send a patch for
the "Cursors" section of the PL/pgSQL documentation that mentions
this. Would have saved me a bunch of hassle.

Best,

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Devrim GÜNDÜZ 2009-07-28 03:57:43 Re: SRPMs?
Previous Message Tom Lane 2009-07-28 00:15:55 Re: WIP: Deferrable unique constraints