Re: Potentially misleading name of libpq pass phrase hook
От | Jonathan S. Katz |
---|---|
Тема | Re: Potentially misleading name of libpq pass phrase hook |
Дата | |
Msg-id | 6124355d-ca04-219d-999f-76a5a4904df9@postgresql.org обсуждение исходный текст |
Ответ на | Re: Potentially misleading name of libpq pass phrase hook (Daniel Gustafsson <daniel@yesql.se>) |
Список | pgsql-hackers |
On 5/16/20 3:16 AM, Daniel Gustafsson wrote: >> On 16 May 2020, at 03:56, Michael Paquier <michael@paquier.xyz> wrote: >> >> On Fri, May 15, 2020 at 09:21:52PM -0400, Jonathan S. Katz wrote: >>> +1 on all of the above. >>> >>> I noticed this has been added to Open Items; I added a note that the >>> plan is to fix before the Beta 1 wrap. >> >> +1. Thanks. >> >> Agreed. PQsslKeyPassHook_<library>_type sounds fine to me as >> convention. Wouldn't we want to also rename PQsetSSLKeyPassHook and >> PQgetSSLKeyPassHook, appending an "_OpenSSL" to both? > > Yes, I think we should. The attached performs the rename of the hook functions > and the type, and also fixes an off-by-one-'=' in a header comment which my OCD > couldn't unsee. Reviewed, overall looks good to me. My question is around the name. It appears the convention is to do "openssl" on hooks[1], with the convention being a single hook I could find. But scanning the codebase, it appears we either use "OPENSSL" for definers and "openssl" in function names. So, my 2¢ is to use all lowercase to stick with convention. Thanks! Jonathan [1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/libpq/libpq-be.h;hb=HEAD#l293
Вложения
В списке pgsql-hackers по дате отправления: