The following bug has been logged on the website:
Bug reference: 15623
Logged by: Roger Curley
Email address: rocurley@gmail.com
PostgreSQL version: 11.1
Operating system: Ubuntu 11.1
Description:
Steps to reproduce (run in psql shell):
```
DROP TABLE IF EXISTS test CASCADE;
CREATE TABLE test (
id int PRIMARY KEY,
value int DEFAULT 0
);
CREATE VIEW test_view AS (SELECT * FROM test);
INSERT INTO test_view VALUES (1, DEFAULT), (2, DEFAULT);
INSERT INTO test VALUES (3, DEFAULT), (4, DEFAULT);
INSERT INTO test_view VALUES (5, DEFAULT);
SELECT * FROM test;
```
Result:
```
id | value
----+-------
1 |
2 |
3 | 0
4 | 0
5 | 0
```
Expected Result:
```
id | value
----+-------
1 | 0
2 | 0
3 | 0
4 | 0
5 | 0
```
In particular, it's surprising that inserting 1 row into an updatable view
uses the table default, while inserting 2 uses null.