Optimizer hook - Mailing list pgsql-patches

From Julius Stroffek
Subject Optimizer hook
Date
Msg-id 46C476E5.8010308@Sun.COM
Whole thread Raw
Responses Re: Optimizer hook
List pgsql-patches
Attached is the patch for the optimizer hook as discussed in
http://archives.postgresql.org/pgsql-hackers/2007-08/msg00362.php

The hook declaration and definition to the same places as the planner_hook
is located since the optimizer_hook relates to the part of the planner and
I find it good to have the planner related hooks on one place.

The optimizer_hook is called in make_one_rel and the plugin replaces
the function 'make_rel_from_joinlist'. I have created a macro
standard_optimizer just for better readability of the code in plugins
and I did not want to change function names.

I also tried to dig out the dynamic programming optimizer and to compile
it and use it as a plugin just to be sure that all the functions necessary
to write the optimizer as a plugin are non-static. I placed all the code
in joinrels.c, make_one_rel_by_joins and make_rel_from_joinlist functions.
Of cause, I renamed all non-static symbols.

Sure, I ran 'make check' without failures.

Is there anything else I should take care? Thanks.

Regards

Julo Stroffek

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: tsearch core path, v0.58
Next
From: Peter Eisentraut
Date:
Subject: Using system time zone database