Re: pg_hba.conf additional comment re local line

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: pg_hba.conf additional comment re local line
Date: 2004-09-21 22:53:41
Message-ID: 4150B0F5.4020404@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tom Lane wrote:

>Andrew Dunstan <andrew(at)dunslane(dot)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
>
>
>

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Koju Iijima 2004-09-22 01:35:15 temporary view from TODO list
Previous Message Gaetano Mendola 2004-09-21 22:52:06 7.4 vs 7.3 ( hash join issue )