ams
ams

Reputation: 62652

How to create an autoupdating postgres timestamp column without using a trigger

On some of my tables I have some columns which contain a creation timestamp column that is supposed to be set on insert and a last update timestamp that is supposed to be updated on every update. I would like to do this without using a trigger is that possible?

Upvotes: 1

Views: 1304

Answers (1)

Adrian Serafin
Adrian Serafin

Reputation: 7715

For creation time column you can set default yo NOW, but for last update time I think you will have to use trigger.

Btw. why you don't want triggers?

Upvotes: 2

Related Questions