Skip site navigation (1) Skip section navigation (2)

Optimizer hook

From: Julius Stroffek <Julius(dot)Stroffek(at)Sun(dot)COM>
To: pgsql-patches(at)postgresql(dot)org
Subject: Optimizer hook
Date: 2007-08-16 16:10:13
Message-ID: 46C476E5.8010308@Sun.COM (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Attached is the patch for the optimizer hook as discussed in

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.


Julo Stroffek

Attachment: optimizer_hook.patch
Description: text/x-patch (3.3 KB)


pgsql-patches by date

Next:From: Peter EisentrautDate: 2007-08-17 09:24:11
Subject: Using system time zone database
Previous:From: Tom LaneDate: 2007-08-16 14:33:45
Subject: Re: tsearch core path, v0.58

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group