INSERT a number in a column based on other columns OLD INSERTs

后端 未结 1 1095
一向
一向 2020-12-20 05:59

In PostgreSQL I have this table... (there is a primary key in the most left side \"timestamp02\" which is not shown in this image, please don\'t bother, its not important fo

相关标签:
1条回答
  • 2020-12-20 06:17

    In an AFTER INSERT trigger, any changes you make to NEW.time_index will be ignored. The record is already inserted at this point; it's too late to modify it.

    Create the trigger as BEFORE INSERT instead.

    0 讨论(0)
提交回复
热议问题