diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2019-02-17 12:37:32 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2019-02-17 12:37:32 -0500 |
commit | b355be443b74d2749db00242d068fabc2df39f27 (patch) | |
tree | 3560d0739bd2161170c48c719d6b3920d6f02d74 /src/backend/executor/nodeModifyTable.c | |
parent | 6e5c270318c92bdb1689da45304d27f85aeb0b91 (diff) | |
download | postgresql-b355be443b74d2749db00242d068fabc2df39f27.tar.gz postgresql-b355be443b74d2749db00242d068fabc2df39f27.zip |
Fix CREATE VIEW to allow zero-column views.
We should logically have allowed this case when we allowed zero-column
tables, but it was overlooked.
Although this might be thought a feature addition, it's really a bug
fix, because it was possible to create a zero-column view via
the convert-table-to-view code path, and then you'd have a situation
where dump/reload would fail. Hence, back-patch to all supported
branches.
Arrange the added test cases to provide coverage of the related
pg_dump code paths (since these views will be dumped and reloaded
during the pg_upgrade regression test). I also made them test
the case where pg_dump has to postpone the view rule into post-data,
which disturbingly had no regression coverage before.
Report and patch by Ashutosh Sharma (test case by me)
Discussion: https://postgr.es/m/CAE9k0PkmHdeSaeZt2ujnb_cKucmK3sDDceDzw7+d5UZoNJPYOg@mail.gmail.com
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
0 files changed, 0 insertions, 0 deletions