-
-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing parameters in the arg_walker
callback of raw_expression_tree_walker
?
#1583
Comments
@daamien Mostly that Postgres 16 diffs this: postgres/postgres@1c27d16 |
@daamien I am happy to accept a PR that does the relevant mischief to make all versions conform to the interface that Postgres 16 describes via the appropriate function-pointer casting/transmutes. |
I'm afraid this is way beyond my capabilities :/ |
These functions had been renamed in Postgres 16, and they are now fn macros. That means this `extern "C"` declaration is simply incorrect in Postgres 16. Implement a relatively logical version-by-version handling. Fixes #1583.
As I'm moving forward with this, I realize that PR #1596 does cover
As far as I can tell, with their current signature those 4 functions a pretty much useless at the moment. Now I guess I should be able to copycat what you did on #1596 and submit a patch to fix those 4 functions.... Should I make a single PR for them all or a distinct PR for each of them ? |
@daamien Feel free to take all of them in one. |
As a follow up to the discussion here #1583 (comment) Here's a patch to declare correctly the following functions: * planstate_tree_walker * query_or_expression_tree_walker * range_table_entry_walker * range_table_walker This is a shameless copy of PR #1596 except for making sure the argument names match the C function argument names. Co-authored-by: Jubilee Young <workingjubilee@gmail.com>
Hi !
This may not be a bug but it is at least very weird :)
I'm trying to use the
raw_expression_tree_walker
function, but I don't understant why thearg_walker
callback function as no parameters... It's signature isunsafe extern C fn() -> bool
https://docs.rs/pgrx/latest/pgrx/pg_sys/fn.raw_expression_tree_walker.html
This callback seems useless if I can't inspect the node itself...
I would expect the walker callback signature to be
unsafe extern C fn(* mut Node, * c_void) -> bool
Looking at the example below in the PostgreSQL code, I see that the tree_walker_callback used in raw_expression_tree_walker does have 2 parameters....
https://github.com/postgres/postgres/blob/master/src/backend/parser/analyze.c#L3576
Am I missing something obvious ?
The text was updated successfully, but these errors were encountered: