Re: pg_hba.conf additional comment re local line

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: pg_hba.conf additional comment re local line
Дата
Msg-id 4150B0F5.4020404@dunslane.net
обсуждение исходный текст
Ответ на Re: pg_hba.conf additional comment re local line  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches

Tom Lane wrote:

>Andrew Dunstan <andrew@dunslane.net> writes:
>
>
>>The attached tiny patch will possibly help to avoid some confusion by
>>Windows users about the "local" line in pg_hba.conf (and thus help
>>reduce queries to us ;-) ).
>>
>>
>
>I was wondering if we could teach initdb to remove that line altogether
>in Windows installations.
>
>
>

See later email.

Of course it can be done. Probably the simplest way is a new small
routine called, say filter_token, which would remove lines containing a
given token:

  static char **filter_token(char **lines, char *token);

Then we could have something like:

#ifdef WIN32 (orwhatever we are calling it now)
    conflines = filter_token(conflines,"@remove-line-for-win32@");
#else
    conflines = replace_token(conflines, "@remove-line-for-win32@","");
#endif

Incidentally, even Unix users frequently get confused about the "local"
line - one of the commonest newbie mistakes is to think it means
localhost. So marking it clearly as being for Unix domain sockets would
still be a Good Thing (tm).

cheers

andrew

>            regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 7: don't forget to increase your free space map settings
>
>
>

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_hba.conf additional comment re local line
Следующее
От: Neil Conway
Дата:
Сообщение: Re: pg_controldata usage