PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID15623
PG Version11.1
OSUbuntu 11.1
Opened2019-02-07 21:42:30+00
Reported byRoger Curley
StatusOpen

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      15623
Logged by:          Roger Curley
Email address:      (redacted)
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.

Messages

DateAuthorSubject
2019-02-07 21:42:30+00PG Bug reporting formBUG #15623: Inconsistent use of default for updatable view
2019-02-08 05:07:28+00Amit LangoteRe: BUG #15623: Inconsistent use of default for updatable view
2019-02-08 11:00:47+00Dean RasheedRe: BUG #15623: Inconsistent use of default for updatable view
2019-02-09 16:57:16+00Amit LangoteRe: BUG #15623: Inconsistent use of default for updatable view
2019-02-10 00:48:12+00Dean RasheedRe: BUG #15623: Inconsistent use of default for updatable view
2019-02-10 11:18:46+00Dean RasheedRe: BUG #15623: Inconsistent use of default for updatable view
2019-02-12 10:33:33+00Dean RasheedRe: BUG #15623: Inconsistent use of default for updatable view
2019-02-13 03:02:25+00Amit LangoteRe: BUG #15623: Inconsistent use of default for updatable view
2019-02-13 09:04:40+00Dean RasheedRe: BUG #15623: Inconsistent use of default for updatable view
2019-02-13 09:33:05+00Amit LangoteRe: BUG #15623: Inconsistent use of default for updatable view
2019-02-27 09:37:11+00Dean RasheedRe: BUG #15623: Inconsistent use of default for updatable view
2019-02-28 07:46:57+00Amit LangoteRe: BUG #15623: Inconsistent use of default for updatable view
2019-02-28 14:07:46+00Dean RasheedRe: BUG #15623: Inconsistent use of default for updatable view