Re: Are partial indicies supported?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Are partial indicies supported?
Date: 2001-02-17 06:33:05
Message-ID: 3089.982391585@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Martijn van Oosterhout <kleptog(at)svana(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jinsoo Hwang 2001-02-17 07:32:04 database backup...
Previous Message Doug McNaught 2001-02-17 05:14:55 Re: How to use postgres 7.0.3 with -F?