From: Bruce Momjian <pgman@candle.pha.pa.us>
To: PostgreSQL-documentation <pgsql-docs@postgresql.org>
Subject: PostgreSQL TO-DO List (fwd)
Date: Sun, 3 Mar 2002 21:55:55 -0500 (EST)
Message-ID: <200203040255.g242tto08892@candle.pha.pa.us> (raw)
Can someone comment on this? I don't understand it.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Hi! Bruce,
Many thanks to your great contributions to Pgsql
projects.
I cannot find the following to-fix bug in section
"SERVER-SIDE LANGUAGES" in "PostgreSQL TO-DO List".
Please also refer to:
"Example 23-4. A PL/pgSQL Function on Composite Type"
in integrated on-line document.
Best Regards,
CN
=========================
create table test(f1 integer,f2 integer);
CREATE FUNCTION fun1(test) RETURNS BOOLEAN AS '
DECLARE
f1 FOR $1.f1;
f2 FOR $1.f2;
integer sum;
BEGIN
sum:=f1+f2;
raise notice ''f1+f2'',sum;
RETURN TRUE;
END;' LANGUAGE 'plpgsql';
-----------------------
CREATE FUNCTION fun2() RETURNS OPAQUE AS '
BEGIN
PERFORM fun1(NEW);
RETURN NEW;
END;' LANGUAGE 'plpgsql';
CREATE TRIGGER ttest AFTER INSERT ON test FOR EACH
ROW EXECUTE PROCEDURE fun2();
insert into test values(1,2);
NOTICE: Error occurred while executing PL/pgSQL
function fun2
NOTICE: line 2 at assignment
ERROR: NEW used in non-rule query
--------------------------------------------------------
You too can have your own email address from Eurosport.
http://www.eurosport.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: pgman@candle.pha.pa.us
Subject: Re: PostgreSQL TO-DO List (fwd)
In-Reply-To: <200203040255.g242tto08892@candle.pha.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox