Re: indxpath.c refactoring

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: indxpath.c refactoring
Date: 2005-06-10 22:33:29
Message-ID: 6154.1118442809@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> This simple refactoring patch moves all of the code associated with
> Partial Index planning into a single file.

Applied with some revisions -

* I put the new predtest.c file into optimizer/util, which seemed a more
plausible location than /path, and gave it its own header file.

* I thought check_partial_indexes() should stay in indxpath.c; it is an
application of the theorem-proving module to indexes, not part of the
prover proper.

* I took the opportunity to rename pred_test() to predicate_implied_by(),
which seems more clear about what it's doing and in which direction.

As for the future...

> - redesigning the low level routines to allow them to perform their
> stuff for both Partial Index and Constraint-based elimination (aka
> Partitioning...)

The other main entry point should probably be called something like
predicate_refuted_by?

> - allow handling for r-tree operators

I don't see anyone very excited about r-tree these days; have you
noticed that no one has stepped up to repair the known semantic errors?
I wouldn't spend any time on it in the prover.

> - maybe GIST also??

The trouble with GiST is that the logical structure of each opclass
could be completely different from the next --- it's certainly not
possible to have a simple fixed table of implications. Again, we have
much more important fish to fry, anyway ...

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2005-06-11 03:03:25 Re: PQmakeEmptyPGresult() will return NULL if allocation
Previous Message Stephen Frost 2005-06-10 17:40:47 Re: Grammer Cleanup