views:

16

answers:

1

We implement some triggers which perform some operations with insert data before committing them to the database and when some conditions fail the trigger should pick up the default value for corresponding column.

How to perform it inside the trigger?

Thank you. PS. we work with postgersql, but other implementation with othee dbs may give a hint.

A: 

NEW.colname = DEFAULT will do the trick.

Frank Heikens