Are partial indicies supported?

Are partial indicies supported?

Post by Martijn van Oosterho » Sun, 18 Feb 2001 13:47:17



Hi,

In the documentation there is this page about partial indicies:

http://postgresql.planetmirror.com/devel-corner/docs/user/partial-ind...

 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?

--

http://cupid.suninternet.com/~kleptog/

 
 
 

Are partial indicies supported?

Post by Tom La » Sun, 18 Feb 2001 15:34:52



Quote:> In the documentation there is this page about partial indicies:
> http://postgresql.planetmirror.com/devel-corner/docs/user/partial-ind...
>  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

 
 
 

Are partial indicies supported?

Post by Martijn van Oosterho » Sun, 18 Feb 2001 23:40:48


[snip]

That's a very good explanation, thanks. Is it possible to get that
explanation into the docs at that page I mentioned above?

Quote:> 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.

I'd like that too, but the query planner sounds like one of the trickier
parts of postgres, dunno if I want to look :)

--

http://cupid.suninternet.com/~kleptog/