pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Is user_catalog_table sensible for matviews?
Date: Thu, 10 Nov 2016 09:27:40 -0500
Message-ID: <3535.1478788060@sss.pgh.pa.us> (raw)
In-Reply-To: <20161110115412.qp6yhslhwurxue4a@alap3.anarazel.de>
References: <19749.1478711862@sss.pgh.pa.us>
	<CA+TgmoYfxfFMjZB1amHEiGdL4KJb8Htj0fQWrRdxWL1bTg_G7Q@mail.gmail.com>
	<20161110115412.qp6yhslhwurxue4a@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Andres Freund <andres@anarazel.de> writes:
> On 2016-11-09 12:55:51 -0500, Robert Haas wrote:
>> On Wed, Nov 9, 2016 at 12:17 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> The system will let you set the "user_catalog_table" reloption to "true"
>>> on a materialized view.  Is this sensible, or is it a bug caused by the
>>> fact that reloptions.c fails to distinguish matviews from heaps at all?
>>> If it is sensible, then I broke it in e3e66d8a9 ...

>> I can understand what that combination of opens would mean from a
>> semantic point of view, so I don't think it's insensible.  However, it
>> doesn't seem like an important combination to support, and I suspect
>> that the fact that we did was accidental.

> I don't see it as being important either. I suspect we intentionally
> didn't exclude it, but less because of a use-case and more because there
> didn't seem to be a need to.

I think it's fundamentally wrong that reloptions.c doesn't distinguish
matviews from heaps.  You can argue about whether this particular case
is okay or not, but sooner or later there's going to be an option that
only applies to one of them.  So I plan to invent RELOPT_KIND_MATVIEW
while I'm rejiggering things to fix the rd_options type safety issue.

Having done that, we could either allow this for matviews or not.
I'm agnostic.  However, unless we feel like back-patching some
modification of e3e66d8a9, 9.5.x and 9.6.x are effectively not
going to allow it (they'd take the option but then ignore it).
I guess that's arguably a bug in itself.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (5+ messages)

Message-ID: <3535.1478788060@sss.pgh.pa.us>
Permalink:  ../3535.1478788060@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3535.1478788060@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, robertmhaas@gmail.com
  Subject: Re: Is user_catalog_table sensible for matviews?
  In-Reply-To: <3535.1478788060@sss.pgh.pa.us>
  References: <19749.1478711862@sss.pgh.pa.us> <CA+TgmoYfxfFMjZB1amHEiGdL4KJb8Htj0fQWrRdxWL1bTg_G7Q@mail.gmail.com> <20161110115412.qp6yhslhwurxue4a@alap3.anarazel.de> <3535.1478788060@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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