Re: [HACKERS] pg_hba_file_settings view patch

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [HACKERS] pg_hba_file_settings view patch
Дата
Msg-id CAB7nPqR1=c4SRaY1LmQSCLoXQ-oW=mph0SNGwcTkr9W3Z3c4Gg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] pg_hba_file_settings view patch  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Ответы Re: [HACKERS] pg_hba_file_settings view patch  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Список pgsql-hackers
On Mon, Jan 30, 2017 at 11:20 AM, Haribabu Kommi
<kommi.haribabu@gmail.com> wrote:
> On Sun, Jan 29, 2017 at 9:18 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> tgl wrote:
>> > I spent awhile hacking on this, and made a lot of things better, but
>> > I'm still very unhappy about the state of the comments.
>>
>> I made another pass over this, working on the comments and the docs,
>> and changing the view name to "pg_hba_file_rules".  I think this version
>> is committable if people are satisfied with that name.

(catching up with this thread as a lot has happened.)

> Thanks for working on the patch. I am fine with the "pg_hba_file_rules"
> name. I have to improve in writing better comments after checking the
> attached patch. I will improve the comments in further patch submissions
> to community.

No objections here.

+/*
+ * The following character array represents the names of the authentication
+ * methods that are supported by PostgreSQL.
+ *
+ * Note: keep this in sync with the UserAuth enum in hba.h.
+ */
+static const char *const UserAuthName[] =
+{
+   "reject",
+   "implicit reject",          /* Not a user-visible option */
+   "trust",
+   "ident",
+   "password",
+   "md5",
+   "gss",
+   "sspi",
+   "pam",
+   "bsd",
+   "ldap",
+   "cert",
+   "radius",
+   "peer"
+};
Perhaps this could use a StaticAssertStmt()? Say something like that:
#define USER_AUTH_LAST uaPeer
StaticAssertStmt(lengthof(UserAuthName) == USER_AUTH_LAST + 1,   "UserAuthName must include all user authentication
names");

Any updates could easily be forgotten.
-- 
Michael



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] sequence data type
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] WIP: About CMake v2