X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id BFFBAD1D8B9 for ; Mon, 24 Nov 2003 16:02:30 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 47417-08 for ; Mon, 24 Nov 2003 12:01:58 -0400 (AST) Received: from smtp1.jazztel.es (smtp1.jazztel.es [62.14.3.161]) by svr1.postgresql.org (Postfix) with ESMTP id BC084D1D88A for ; Mon, 24 Nov 2003 12:01:57 -0400 (AST) Received: from antivirus by smtp1.jazztel.es with antivirus id 1AOJ9v-0000KE-00 for pgsql-docs@postgresql.org Mon, 24 Nov 2003 17:01:55 +0100 Received: from [62.14.129.206] (helo=truchado.jazztel.es) by smtp1.jazztel.es with esmtp id 1AOJ9u-0000JX-00 for pgsql-docs@postgresql.org Mon, 24 Nov 2003 17:01:55 +0100 Message-ID: <3FC22BB0.1030007@truchado.jazztel.es> Date: Mon, 24 Nov 2003 17:02:56 +0100 From: Marcos Truchado User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030929 X-Accept-Language: es, en-us, en MIME-Version: 1.0 To: pgsql-docs@postgresql.org Subject: error in plpgsql-statements.html#PLPGSQL-SELECT-INTO X-Enigmail-Version: 0.76.7.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/alternative; boundary="------------030303010200020602080501" X-Virus-Scanned: by antivirus X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/66 X-Sequence-Number: 2143 This is a multi-part message in MIME format. --------------030303010200020602080501 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi. I have just learned how to create my own triggers on plpgsql language, and I think I have discover an error into the doc: http://www.postgresql.org/docs/current/static/plpgsql-statements.html#PLPGSQL-SELECT-INTO ------------------------------------------------------------------------ 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; ------------------------------------------------------------------------ full_name declared, but not used. --------------030303010200020602080501 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Hi. I have just learned how to create my own triggers on plpgsql language, and I think I have discover an error into the doc:

http://www.postgresql.org/docs/current/static/plpgsql-statements.html#PLPGSQL-SELECT-INTO

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;

full_name declared, but not used.




--------------030303010200020602080501--