Re: Are partial indicies supported?
От | Tom Lane |
---|---|
Тема | Re: Are partial indicies supported? |
Дата | |
Msg-id | 3089.982391585@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Are partial indicies supported? (Martijn van Oosterhout <kleptog@svana.org>) |
Список | pgsql-general |
Martijn van Oosterhout <kleptog@svana.org> writes: > In the documentation there is this page about partial indicies: > http://postgresql.planetmirror.com/devel-corner/docs/user/partial-index.htm > From my reading of that I would guess they are supported but since they > aren't mentioned anywhere else, I guess they're not. > Can somone clarify the situation please? There is no provision in the CREATE INDEX grammar for a partial index condition clause. Some digging in the CVS archives shows that this was true clear back to Postgres95, and that Postgres 4.2 was the last release that accepted a condition clause. I have no idea why Andrew and Jolly removed it --- they certainly didn't hesitate to support Postgres 4.2's other non-ANSI-SQL extensions to CREATE INDEX. There is still a substantial amount of code in the planner and executor to support partial indexes, however. Since it hasn't been exercised in six or seven years, it's doubtless suffering bit rot ... but it's there. An optimistic view is that a couple more lines of code in gram.y and some vigorous dust-sweeping would resurrect the feature. A pessimistic view is that Andrew and Jolly disabled the feature because they knew that it was fatally broken for some undocumented, now-forgotten reason. The truth is probably somewhere in between. I'd like to see the feature brought back, myself, but I dunno when it will get to the top of someone's to-do queue. regards, tom lane
В списке pgsql-general по дате отправления: