"Mitch Vincent" <mitch(at)venux(dot)net> writes:
> CREATE FUNCTION invoice_payment() RETURNS OPAQUE AS '
> BEGIN
> UPDATE invoice_master SET total = total - NEW.amount,updated = ''now''
> WHERE invoice_id = NEW.invoice_id;
> RETURN NEW;
> END;
> ' LANGUAGE 'plpgsql';
> total gets updated but the field 'updated' does not
Try updated = now(). The above is probably reducing 'now' to a
timestamp constant when the function is compiled ...
regards, tom lane