From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org> |
Subject: | default psql to localhost on platforms without unix domain sockets |
Date: | 2004-03-15 10:43:30 |
Message-ID: | 405588D2.3030608@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-hackers-win32 pgsql-patches |
Bruce Momjian wrote:
>Andrew Dunstan wrote:
>
>>Also, what is the default connection mode of psql? It should probably be
>>equivalent to "-h localhost", shouldn't it?
>>
>>
>
>Now that is something I had not thought of. Seems we can assume a Win32
>psql can never use unix domain sockets, so defaulting that to localhost
>is a good solution too.
>
The trivial patch below does this (I think). I still don't have an
available Windows box for testing, so someone who does please verify.
thanks
andrew
Index: src/bin/psql/startup.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/startup.c,v
retrieving revision 1.85
diff -c -r1.85 startup.c
*** src/bin/psql/startup.c 19 Feb 2004 19:40:09 -0000 1.85
--- src/bin/psql/startup.c 15 Mar 2004 10:37:50 -0000
***************
*** 153,158 ****
--- 153,162 ----
pset.getPassword = false;
#endif
+ #ifndef HAVE_UNIX_SOCKETS
+ options.host = "localhost";
+ #endif
+
parse_psql_options(argc, argv, &options);
if (!pset.popt.topt.fieldSep)
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-03-15 14:03:12 | Re: Custom format for pg_dumpall |
Previous Message | Christopher Kings-Lynne | 2004-03-15 06:23:56 | Custom format for pg_dumpall |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-03-15 16:14:24 | Re: initdb problen |
Previous Message | Tom Lane | 2004-03-14 21:16:05 | Re: listening addresses |
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2004-03-15 10:47:52 | Re: client side syntax error position (v3) |
Previous Message | Fabien COELHO | 2004-03-15 10:04:26 | Re: client side syntax error position (v3) |