Trigger calling a function HELP ME! (2)

From: Riccardo Facchini <facchini(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Trigger calling a function HELP ME! (2)
Date: 2004-04-21 14:54:56
Message-ID: 20040421145456.55831.qmail@web13904.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Sorry. I realize I slipped an error in my code:

the code is:
---
CREATE TABLE public.imp_test
(
id int8,
value text
) WITHOUT OIDS;

CREATE OR REPLACE FUNCTION public.imp_test_to_out_test(imp_test)
RETURNS imp_test AS
'begin
return $1;
end;'
LANGUAGE 'plpgsql' STABLE;

CREATE OR REPLACE FUNCTION public.imp_test_trigger()
RETURNS trigger AS
'begin
return imp_test_to_out_test(new);
end;'
LANGUAGE 'plpgsql' STABLE;

CREATE TRIGGER imp_test_trigger_001
BEFORE INSERT OR UPDATE
ON public.imp_test
FOR EACH ROW
EXECUTE PROCEDURE public.imp_test_trigger();
---

regards,

=====
Riccardo G. Facchini

Browse pgsql-sql by date

  From Date Subject
Next Message Denis Khabas 2004-04-21 14:58:28 Which SQL command creates ExclusiveLock?
Previous Message Edmund Bacon 2004-04-21 14:52:20 Re: Order by YYYY MM DD in reverse chrono order trouble