Knut Suebert wrote:
> Joe Conway schrieb:
>
> > OLD does not make sense on an insert because there is no "OLD" data for a
> > brand new row. Similarly, there is no "NEW" data during a delete. See
> > http://www.postgresql.org/idocs/index.php?plpgsql-trigger.html
>
> Makes sense, thanks. And at the
> create function nac_viceversa() returns opaque as'
> begin
> NEW.minport := nacmin(OLD.sport,OLD.dport);
> NEW.maxport := nacmax(OLD.sport,OLD.dport);
> return NEW;
> end;
> 'language 'plpgsql';
>
> create trigger nac_update after insert or update on traf
> for each row execute procedure nac_vic