Re: ON SELECT rule on a table without columns
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ashutosh Sharma <ashu.coek88@gmail.com>
Cc: Andres Freund <andres@anarazel.de>,
Rushabh Lathia <rushabh.lathia@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-02-08T18:02:54Z
Lists: pgsql-hackers
Ashutosh Sharma <ashu.coek88@gmail.com> writes: > Attached is the patch that allows us to create view on a table without > columns. I've also added some test-cases for it in create_view.sql. > Please have a look and let me know your opinion. Haven't read the patch, but a question seems in order here: should we regard this as a back-patchable bug fix? The original example shows that it's possible to create a zero-column view in existing releases, which I believe would then lead to dump/reload failures. So that seems to qualify as a bug not just a missing feature. On the other hand, given the lack of field complaints, maybe it's not worth the trouble to back-patch. I don't have a strong opinion either way. BTW, has anyone checked on what the matview code paths will do? Or SELECT INTO? regards, tom lane
Commits
-
Fix CREATE VIEW to allow zero-column views.
- b355be443b74 10.8 landed
- 9fdc49d08fe4 9.4.22 landed
- 1f29a1d2288a 9.6.13 landed
- 0b476cf623dd 9.5.17 landed
- a32ca7883629 12.0 landed
- 4eca1905d34b 11.3 landed