pgcentralfoundation / pgrx

Build Postgres Extensions with Rust!
Other
3.42k stars 223 forks source link

Support for `ClientAuthentication_hook` #1738

Open draescherl opened 2 weeks ago

draescherl commented 2 weeks ago

Hi, thanks for the amazing work.

I was wondering if the ClientAuthentication_hook was supported?

I couldn't find a reference to it in the docs. Looking through issues and pull requests, all I could find are the following issue https://github.com/pgcentralfoundation/pgrx/issues/1073 and related PR https://github.com/pgcentralfoundation/pgrx/pull/1077, which seem to indicate they aren't available in PGRX yet.

Has this changed since then? If not, is it because supporting it is non-trivial?

Thanks in advance!

eeeebbbbrrrr commented 2 weeks ago

We don’t have safe wrappers around it but it’s super easy to add the hook yourself with a bit of unsafe {}

draescherl commented 2 weeks ago

Hi, thanks for the quick reply. I'd be very curious to try adding the hook myself, however my experience with Rust is quite limited and I'm not sure how to go about it. Would you have a commit I could use as an example?