-
-
Notifications
You must be signed in to change notification settings - Fork 297
Add libpq/auth.h #2154
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
base: develop
Are you sure you want to change the base?
Add libpq/auth.h #2154
Conversation
This will expose the ClientAuthentication_hook
|
Looks like this one will require an extra system dependency. Any chances we can make that better? |
|
yes the Sorry about that |
|
What exactly is the goal of the authentication hook being included here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I anticipate our response to this is much the same as #2117: Even if we can get it working in CI, this probably will add too much friction to dev with pgrx. We probably should just handbind everything we want instead, and I think we're happy to host the hand-bindings upstream and keep them consistent on version updates, as long as they are what we need and no more and we document what we are binding them from. This is an unfortunate flaw of bindgen, because it tries too much to be a C compiler, even when it doesn't need to be.
|
I think in general anything that comes from Perhaps we could have a separate crate with its own bindgen and such just for I'm not volunteering to do that, however. As an aside... I haven't studied any of the libpq headers but maybe there's a different path where for pgrx' purposes we can |
|
@eeeebbbbrrrr The structs that most people want are ABI-compatible across "having SSL" or "not having SSL" (or similar configurations... the field remains in-place, it just is a |
|
Mind, we could do bindgen + undefining the |
|
Many Thanks for taking the time to look into this. I was not aware of this complexity when I submitted the patch. The mere thought of how to install the Kerberos headers on windows is already frighenting me 😨 I am willing to give a try at the hand binding solution if that's the preferred option and if there's a practical example that I could rely. Other than that I don't have enough time to explore any further. I am ok to close this PR if you think this is too much of a hassle.... |
|
For handwriting bindings, you just do what bindgen does automatically: you write out the struct definitions and check they are correct. This allows you to, because you are editing them by hand, replace types that are unimportant with alternative stubbed-out type definitions: when they are behind a pointer, it doesn't matter. |
This will expose the ClientAuthentication_hook