PostgreSQL 7.4 Documentation - PL/pgSQL

From: Halley Pacheco de Oliveira <halleypo(at)yahoo(dot)com(dot)br>
To: pgsql-docs(at)postgresql(dot)org
Subject: PostgreSQL 7.4 Documentation - PL/pgSQL
Date: 2004-06-08 11:37:13
Message-ID: 20040608113713.66993.qmail@web52709.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

In PL/pgSQL - SQL Procedural Language, 37.6.2. SELECT
INTO, is written:

Here is an example that handles the case where no rows
have been returned:

DECLARE
users_rec RECORD;
full_name varchar;
BEGIN
SELECT INTO users_rec * FROM users WHERE
user_id=3;

IF users_rec.homepage IS NULL THEN
-- user entered no homepage, return "http://"
RETURN ''http://'';
END IF;
END;

In the example before this no rows were returned. This
is an example of NULL result, not of NOT FOUND. The
comment says "-- user entered no homepage".

In "37.8.3.3. Returning Cursors" is written:

<unnamed cursor 1>

But I'm getting;

<unnamed portal 1>

Regards,
Halley

______________________________________________________________________

Participe da pesquisa global sobre o Yahoo! Mail:
http://br.surveys.yahoo.com/global_mail_survey_br

Browse pgsql-docs by date

  From Date Subject
Next Message Halley Pacheco de Oliveira 2004-06-13 14:21:10 PostgreSQL 7.4 Documentation - The Information Schema
Previous Message Mark Harrison 2004-06-07 21:49:13 Application Note: Integrating Posgresql queries into an event loop.