Lists: | pgsql-patches |
---|
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org> |
Subject: | pg_hba.conf additional comment re local line |
Date: | 2004-09-21 16:54:55 |
Message-ID: | 41505CDF.1040303@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
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 ;-) ). It also removes an essentially content-free
suffix in 2 nearby comment lines.
cheers
andrew
Attachment | Content-Type | Size |
---|---|---|
hba.patch | text/x-patch | 1.2 KB |
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net>, "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: pg_hba.conf additional comment re local line |
Date: | 2004-09-21 18:58:01 |
Message-ID: | 200409212058.01996.peter_e@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
Andrew Dunstan wrote:
> 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 ;-) ). It also removes an essentially
> content-free suffix in 2 nearby comment lines.
Maybe initdb should just remove those lines on Windows.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: pg_hba.conf additional comment re local line |
Date: | 2004-09-21 20:15:19 |
Message-ID: | 41508BD7.5080609@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
Peter Eisentraut wrote:
>Andrew Dunstan wrote:
>
>
>>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 ;-) ). It also removes an essentially
>>content-free suffix in 2 nearby comment lines.
>>
>>
>
>Maybe initdb should just remove those lines on Windows.
>
>
>
You are probably right. initdb's filtering capabilities are (by design)
rather primitive - I didn't want to clutter it up with regex code - so
it's a bit less easy than it might otherwise be.
This patch was done as a "quick fix".
If someone doesn't beat me to it I will try to look at initdb in the
next week or so.
cheers
andrew
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: pg_hba.conf additional comment re local line |
Date: | 2004-09-21 22:31:37 |
Message-ID: | 4133.1095805897@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
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.
regards, tom lane
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 |
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
>
>
>