Re: ON SELECT rule on a table without columns

From: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ON SELECT rule on a table without columns
Date: 2019-02-08 16:27:14
Message-ID: CAE9k0PkRJBZ3KhAiM3DBOLDxKN=egHBa6P-LBC48F_Vjk=VKrQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 8, 2019 at 7:55 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > You misunderstood my point: I'm asking why we shouldn't remove that check from views, rather than adding it to create rule.
>
> +1. This seems pretty obviously to be something we just missed when
> we changed things to allow zero-column tables.
>

Thanks Andres for bringing up that point and thanks Tom for the confirmation.

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.

--
With Regards,
Ashutosh Sharma
EnterpriseDB:http://www.enterprisedb.com

Attachment Content-Type Size
allow-create-view-on-table-without-columns.patch text/x-patch 1.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Konstantin Knizhnik 2019-02-08 16:33:53 Re: libpq compression
Previous Message Robbie Harwood 2019-02-08 16:26:44 Re: libpq compression