Robert Haas <robertmh...@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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs