Thanks you so much!
it works great now
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/PostgreSQL-Trigger-and-rows-updated-tp5608591p5609895.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
--
Sent via pgsql-general mailing list (pgsql-general
Albert wrote:
> UPDATE hello_cars SET status = new.status
> WHERE OLD.ID = NEW.ID;
[...]
> the trigger works fine. when cars table updated, the hello_cars table
> updated but status column in each row is updated and contains same new
> status ! it must be updated according to ca
am trying to update a table according to this trigger :
CREATE TRIGGER alert
AFTER UPDATE ON cars
FOR EACH ROW
EXECUTE PROCEDURE update_cars();
Trigger Function :
CREATE FUNCTION update_cars()
RETURNS 'TRIGGER'
AS $BODY$
BEGIN
IF (TG_OP = 'UPDATE') THEN