Thread: fire trigger for a row without update?

fire trigger for a row without update?

From
Gerhard Heift
Date:
Hello,

is it possible to call a trigger for a row in a table without updating the
row? I want to do it in plpgsql.

Something like UPDATE table WHERE id = 10;
or PERFORM table.trigger('UPDATE', row) WHERE id = 10;

Regards,
  Gerhard

Attachment

Re: fire trigger for a row without update?

From
"Albe Laurenz"
Date:
Gerhard Heift wrote:
> is it possible to call a trigger for a row in a table without updating
the
> row? I want to do it in plpgsql.
>
> Something like UPDATE table WHERE id = 10;
> or PERFORM table.trigger('UPDATE', row) WHERE id = 10;

Think twice if you really need that - it sounds a little odd.

But you could do:

UPDATE tab SET id = 10 WHERE id = 10;

or something similar. This would of course create a new row version, but
it would do what you want.

Yours,
Laurenz Albe