pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Thom Brown <thom@linux.com>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: Dropped index on table preventing rule creation
Date: Wed, 14 Sep 2011 23:58:15 -0400
Message-ID: <15556.1316059095@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoYJu24Y8uUAJ4zeQAhoYxLmFxcy+5Hdij9ehjoxKo3j3g@mail.gmail.com>
References: <CAA-aLv7sszmU+Fz-xLo6cOiASUiX0mCRwAMF2FB=2j-5MKqb+A@mail.gmail.com>
	<28537.1315715201@sss.pgh.pa.us>
	<C85619BB-735B-4821-9476-F2F489FD832C@gmail.com>
	<12987.1315949508@sss.pgh.pa.us>
	<CA+TgmoYJu24Y8uUAJ4zeQAhoYxLmFxcy+5Hdij9ehjoxKo3j3g@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> I spent some more time looking at this tonight.  I am wondering if
> perhaps we should just get rid of relhasindex.

-1, there is absolutely no reason to believe that's a good idea.

> ... I think we could fix Thom's complaint by changing
> DefineQueryRewrite() to call RelationGetIndexList() rather than
> blindly believing relhasindex, which would be maybe a five line
> code-change.  We'd probably also want to change
> SetRelationRuleStatus() to clear relhasindex, which would be one more
> line of code.

Yeah, that's about what it would take, but what I'm asking is why
bother.  The *only* case that we support here is turning a just-created,
not-fooled-with table into a view, and I don't feel a need to promise
that we will handle other cases (which are inevitably going to be poorly
tested).  See for example the adjacent relhassubclass test, which has
got exactly the same issue.

> One related thing that seems worth doing is ripping out relhaspkey,

Having a hard time getting excited about that either ...

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <15556.1316059095@sss.pgh.pa.us>
Permalink:  ../15556.1316059095@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15556.1316059095@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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, thom@linux.com
  Subject: Re: Dropped index on table preventing rule creation
  In-Reply-To: <15556.1316059095@sss.pgh.pa.us>
  References: <CAA-aLv7sszmU+Fz-xLo6cOiASUiX0mCRwAMF2FB=2j-5MKqb+A@mail.gmail.com> <28537.1315715201@sss.pgh.pa.us> <C85619BB-735B-4821-9476-F2F489FD832C@gmail.com> <12987.1315949508@sss.pgh.pa.us> <CA+TgmoYJu24Y8uUAJ4zeQAhoYxLmFxcy+5Hdij9ehjoxKo3j3g@mail.gmail.com> <15556.1316059095@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