X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DCD91D1B20F for ; Tue, 8 Jun 2004 08:37:24 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 99151-03 for ; Tue, 8 Jun 2004 11:37:15 +0000 (GMT) Received: from web52709.mail.yahoo.com (web52709.mail.yahoo.com [206.190.39.160]) by svr1.postgresql.org (Postfix) with SMTP id 99F20D1B435 for ; Tue, 8 Jun 2004 08:37:10 -0300 (ADT) Message-ID: <20040608113713.66993.qmail@web52709.mail.yahoo.com> Received: from [201.8.23.61] by web52709.mail.yahoo.com via HTTP; Tue, 08 Jun 2004 08:37:13 ART Date: Tue, 8 Jun 2004 08:37:13 -0300 (ART) From: =?iso-8859-1?q?Halley=20Pacheco=20de=20Oliveira?= Subject: PostgreSQL 7.4 Documentation - PL/pgSQL To: pgsql-docs@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/5 X-Sequence-Number: 2403 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: But I'm getting; Regards, Halley ______________________________________________________________________ Participe da pesquisa global sobre o Yahoo! Mail: http://br.surveys.yahoo.com/global_mail_survey_br