-
-
Notifications
You must be signed in to change notification settings - Fork 297
Include libpq/libpq-be.h #2117
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
Include libpq/libpq-be.h #2117
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see a response to usamoi's suggestion to use https://docs.rs/pgrx/latest/pgrx/pg_sys/fn.get_database_name.html Eric reviewed the header and thinks libpq-be is a bridge too far for pgrx, and it requires additional linkages such as these that cause complications. I don't think this should be merged without at the very least an answer as to why usamoi's alternative route is not acceptable.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll take a look later this week. My goal is to implement a log hook that writes in a new format, so I'm interested in all the fields included in the current formats. The ones I see from MyProcPort in text prefix, CSV, JSON are:
If you have any suggestions for alternatives, I'd appreciate them.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If struct Port {
sock: pgrx::pg_sys::pgsocket,
noblock: bool,
proto: pgrx::pg_sys::ProtocolVersion,
laddr: pgrx::pg_sys::SockAddr,
raddr: pgrx::pg_sys::SockAddr,
remote_host: *mut core::ffi::c_char,
remote_hostname: *mut core::ffi::c_char,
remote_hostname_resolv: core::ffi::c_int,
remote_hostname_errcode: core::ffi::c_int,
remote_port: *mut core::ffi::c_char,
#[cfg(any(feature = "pg13", feature = "pg14", feature = "pg15", feature = "pg16"))]
canAcceptConnections: core::ffi::c_uint,
#[cfg(feature = "pg18")]
local_host: [core::ffi::c_char; 64],
database_name: *mut core::ffi::c_char,
user_name: *mut core::ffi::c_char,
cmdline_options: *mut core::ffi::c_char,
guc_options: *mut core::ffi::c_char,
application_name: *mut core::ffi::c_char,
}You just need to check whether |
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'm concerned about this new requirement.
If this is now required for pgrx extensions it will most likely break everyone's CI. This isn't something I want to do.
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.
Can we do this such that kerberos isn't a required system dependency?
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.
This is not a new dependency. The Postgres installed in the GitHub action is compiled with
--with-gssapi, so bindgen is loading apg_config.hcontainingENABLE_GSS 1andHAVE_GSSAPI_GSSAPI_H 1.The GSS headers are in the
libkrb5-devpackage.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.
The Postgres installed in the action is compiled
--with-opensslsolibssl-devis installed on the line below this one.