| From: | Vadim Mikheev <vadim(at)krs(dot)ru> |
|---|---|
| To: | Jan Wieck <jwieck(at)debis(dot)com> |
| Cc: | hackers(at)postgreSQL(dot)org |
| Subject: | Re: AW: AW: [HACKERS] Rule system |
| Date: | 1998-08-14 02:01:05 |
| Message-ID: | 35D39A61.AFD397EA@krs.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Jan Wieck wrote:
>
> It might look like:
>
> create trigger mytrig before insert or update on mytab
> for each row do (
^^
Why not EXECUTE ?
> begin
> new.lastupdate := 'now';
> return new;
> end;
> ) language 'plpgsql';
>
> This would be easy. Just an enhancement to the parser and to
> the create trigger utility processing so it creates the
> required function on the fly. Modification of new, raising
> errors via elog() and suppressing the operation itself by
> returning NULL is already there in PL/pgSQL. We would need
> something smart for the functions name, because using the
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> trigger name only would break the current possibility to
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> define the same trigger name on different tables with
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> different actions. Something like __trig_<oid> would be good.
^^^^^^^^^^^^^^^^^
I missed here. What did you mean?
Vadim
P.S. Sorry, I'm very busy currently :((
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas G. Lockhart | 1998-08-14 04:24:49 | Re: [HACKERS] Re: type coersion (was OR clause status) |
| Previous Message | Jan Wieck | 1998-08-13 19:20:49 | Re: [HACKERS] tuple return from function |