From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Thom Brown <thom(at)linux(dot)com>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: Dropped index on table preventing rule creation |
Date: | 2011-09-15 03:58:15 |
Message-ID: | 15556.1316059095@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Robert Haas <robertmhaas(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-09-15 04:05:26 | Re: BUG #6205: ERROR: temporary tables cannot specify a schema name |
Previous Message | Eduardo Piombino | 2011-09-15 03:55:44 | BUG #6207: fali to get lock on parent table after two consecutive updates to the same row in child table |