Reputation: 9
Can we have multiple default values according to conditions stated for each default in postresql?
Like Can we have different defaults according to a entry of a column for each insert.
Upvotes: 0
Views: 40
Reputation: 246013
A column default cannot depend on other columns in the table. You probably need a BEFORE INSERT
trigger.
Upvotes: 1