Re: default value dosen't get applyed in this situation - Mailing list pgsql-hackers

From Tom Lane
Subject Re: default value dosen't get applyed in this situation
Date
Msg-id 4724.1431293632@sss.pgh.pa.us
Whole thread Raw
In response to default value dosen't get applyed in this situation  (Aliouii Ali <aliouii.ali@aol.fr>)
List pgsql-hackers
Aliouii Ali <aliouii.ali@aol.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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Parallel Seq Scan
Next
From: Kohei KaiGai
Date:
Subject: Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API)