Aliouii Ali <aliouii(dot)ali(at)aol(dot)fr> writes:
> this a test case :
This is not supposed to insert a default. Attach a default expression
to the view column, if you want inserts on the view to have defaults.
ALTER VIEW ... ALTER COLUMN ... SET DEFAULT is the way.
(Note that in recent versions of PG, that view would be auto-insertable
so you would not need to bother with the trigger. But the situation
with defaults hasn't changed, and won't because it would be a backwards
compatibility break with no real value-add.)
regards, tom lane