| From: | "F(dot) Masselink" <tiggr(at)xs4all(dot)nl> |
|---|---|
| To: | "Postgres (general newsgroup)" <pgsql-general(at)postgresql(dot)org> |
| Subject: | function / trigger problem |
| Date: | 2001-06-13 08:49:49 |
| Message-ID: | 3B27292D.3090506@xs4all.nl |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Hello,
i've stumbled upon a problem with triggers and functions.
this function doesn't work.
It gives an error when creating the trigger: set_leentype() does not exist.
CREATE FUNCTION set_leentype (int4) RETURNS opaque AS '
BEGIN
NEW.type := $1;
RETURN NEW;
END;
' LANGUAGE 'plpgsql';
CREATE TRIGGER is_boek
BEFORE INSERT ON boek
FOR EACH ROW
EXECUTE PROCEDURE set_leentype (1);
but if i use the same function and triggers, with the little
modification that i don't pass a parameter, it works fine!
does anyone know why this is and does anyone know a solution to this. (I
want to use the code with passing parameters).
thanx,
F.H.A. Masselink
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Itzinger, Oskar | 2001-06-13 09:15:37 | [Help] AGGREGATE problem w/v7.0 |
| Previous Message | Martín Marqués | 2001-06-13 08:26:54 | Re: [SQL] ORDER BY what? |