pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix CREATE VIEW to allow zero-column views.
6+ messages / 1 participants
[nested] [flat]

* pgsql: Fix CREATE VIEW to allow zero-column views.
@ 2019-02-17 17:37  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2019-02-17 17:37 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0b476cf623dd5849679d4509f6b06b8be7f3436e

Modified Files
--------------
src/backend/commands/view.c                |  5 -----
src/test/regress/expected/create_view.out  | 10 ++++++++++
src/test/regress/expected/rules.out        |  8 ++++++++
src/test/regress/expected/sanity_check.out |  1 +
src/test/regress/sql/create_view.sql       | 12 ++++++++++++
5 files changed, 31 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix CREATE VIEW to allow zero-column views.
@ 2019-02-17 17:37  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2019-02-17 17:37 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b355be443b74d2749db00242d068fabc2df39f27

Modified Files
--------------
src/backend/commands/view.c                |  5 -----
src/test/regress/expected/create_view.out  | 10 ++++++++++
src/test/regress/expected/rules.out        |  8 ++++++++
src/test/regress/expected/sanity_check.out |  1 +
src/test/regress/sql/create_view.sql       | 12 ++++++++++++
5 files changed, 31 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix CREATE VIEW to allow zero-column views.
@ 2019-02-17 17:37  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2019-02-17 17:37 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a32ca7883629f6b1fbbf0bd2e2aa11ec86edb6b3

Modified Files
--------------
src/backend/commands/view.c                |  5 -----
src/test/regress/expected/create_view.out  | 10 ++++++++++
src/test/regress/expected/rules.out        |  8 ++++++++
src/test/regress/expected/sanity_check.out |  1 +
src/test/regress/sql/create_view.sql       | 12 ++++++++++++
5 files changed, 31 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix CREATE VIEW to allow zero-column views.
@ 2019-02-17 17:37  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2019-02-17 17:37 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1f29a1d2288a10282fa0dc4cd53000f4d660c7d6

Modified Files
--------------
src/backend/commands/view.c                |  5 -----
src/test/regress/expected/create_view.out  | 10 ++++++++++
src/test/regress/expected/rules.out        |  8 ++++++++
src/test/regress/expected/sanity_check.out |  1 +
src/test/regress/sql/create_view.sql       | 12 ++++++++++++
5 files changed, 31 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix CREATE VIEW to allow zero-column views.
@ 2019-02-17 17:37  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2019-02-17 17:37 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9fdc49d08fe405f0503f93849844a73517bd5cbd

Modified Files
--------------
src/backend/commands/view.c                |  5 -----
src/test/regress/expected/create_view.out  | 10 ++++++++++
src/test/regress/expected/rules.out        |  8 ++++++++
src/test/regress/expected/sanity_check.out |  1 +
src/test/regress/sql/create_view.sql       | 12 ++++++++++++
5 files changed, 31 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix CREATE VIEW to allow zero-column views.
@ 2019-02-17 17:37  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2019-02-17 17:37 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4eca1905d34b34a48b80553262edc81048fd7dfe

Modified Files
--------------
src/backend/commands/view.c                |  5 -----
src/test/regress/expected/create_view.out  | 10 ++++++++++
src/test/regress/expected/rules.out        |  8 ++++++++
src/test/regress/expected/sanity_check.out |  1 +
src/test/regress/sql/create_view.sql       | 12 ++++++++++++
5 files changed, 31 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2019-02-17 17:37 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-02-17 17:37 pgsql: Fix CREATE VIEW to allow zero-column views. Tom Lane <tgl@sss.pgh.pa.us>
2019-02-17 17:37 pgsql: Fix CREATE VIEW to allow zero-column views. Tom Lane <tgl@sss.pgh.pa.us>
2019-02-17 17:37 pgsql: Fix CREATE VIEW to allow zero-column views. Tom Lane <tgl@sss.pgh.pa.us>
2019-02-17 17:37 pgsql: Fix CREATE VIEW to allow zero-column views. Tom Lane <tgl@sss.pgh.pa.us>
2019-02-17 17:37 pgsql: Fix CREATE VIEW to allow zero-column views. Tom Lane <tgl@sss.pgh.pa.us>
2019-02-17 17:37 pgsql: Fix CREATE VIEW to allow zero-column views. Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox