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 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
Attachment | Content-Type | Size |
---|---|---|
optimizer_hook.patch | text/x-patch | 3.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2007-08-17 09:24:11 | Using system time zone database |
Previous Message | Tom Lane | 2007-08-16 14:33:45 | Re: tsearch core path, v0.58 |