Trigger calling a function HELP ME! (2)

From: <abief_ag_-postgresql(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Trigger calling a function HELP ME! (2)
Date: 2004-04-21 15:16:05
Message-ID: 20040421151605.77039.qmail@web13901.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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Kemin Zhou 2004-04-21 17:57:21 Server Side C programming Environment Set up
Previous Message francescosaf 2004-04-21 15:00:23 problem with slow select