pg_hba.conf additional comment re local line
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
Attachments:
hba.patchtext/x-patch; name=hba.patchDownload+5-4
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/
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
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.
regards, tom lane
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
Show quoted text
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
The original of this seems to have gotten lost in the ether somewhere.
It might turn up some day ...
andrew
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.
I think this does what Tom and Peter suggested. I don't have a Windows
box to test it on, though.
cheers
andrew
Attachments:
hba.patchtext/x-patch; name=hba.patchDownload+45-7
Import Notes
Resolved by subject fallback
Patch applied. Thanks.
I adjusted the code slightly and I tested !HAVE_UNIX_SOCKETS rather than
Win32.
---------------------------------------------------------------------------
Andrew Dunstan wrote:
The original of this seems to have gotten lost in the ether somewhere.
It might turn up some day ...andrew
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.I think this does what Tom and Peter suggested. I don't have a Windows
box to test it on, though.cheers
andrew
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073