Re: [PATCH] Connect to database using UNIX domain sockets

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Dominique Quatravaux" <dom(at)idealx(dot)com>, <pgadmin-support(at)postgresql(dot)org>
Subject: Re: [PATCH] Connect to database using UNIX domain sockets
Date: 2005-04-14 15:28:27
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E472C216@ratbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Thanks Dom, I've committed a patch for complete UDS support based on your work.

Regards, Dave.

> -----Original Message-----
> From: pgadmin-support-owner(at)postgresql(dot)org
> [mailto:pgadmin-support-owner(at)postgresql(dot)org] On Behalf Of
> Dominique Quatravaux
> Sent: 13 April 2005 17:02
> To: pgadmin-support(at)postgresql(dot)org
> Subject: [pgadmin-support] [PATCH] Connect to database using
> UNIX domain sockets
>
> Dear pgadmin hackers,
>
> Enclosed is a small, nonintrusive patch that allows one to connect to
> a database using the UNIX domain socket under Linux and BSD (a must
> for secure, password-less operation). One simply leaves the "hostname"
> field blank when filling in the database connection form.
>
> Since this patch leverages the clever fallback mechanism already built
> into libpq, I see no reason why it would break anything under Windows.
>
> Thanks for your work on pgadmin. Regards, Dom
>
> ------------
>
> --- pgadmin3-1.0.2/src/db/pgConn.cpp.ORIG 2005-04-13
> 12:49:43.000000000 +0200
> +++ pgadmin3-1.0.2/src/db/pgConn.cpp 2005-04-13
> 14:38:50.000000000 +0200
> @@ -44,6 +48,8 @@
> wxLogInfo(wxT("Creating pgConn object"));
> wxString msg, hostip;
>
> + hostip.Empty();
> +
> conv = &wxConvLibc;
> needColQuoting = false;
>
> @@ -54,6 +60,7 @@
> majorVersion=0;
> noticeArg=0;
>
> + if (! server.IsEmpty()) {
> #ifdef __WXMSW__
> struct in_addr ipaddr;
> #else
> @@ -78,13 +85,14 @@
> }
> else
> hostip = server;
> + }
>
> resolvedIP = TRUE;
> wxLogInfo(wxT("Server name: %s (resolved to: %s)"),
> server.c_str(), hostip.c_str());
>
> // Create the connection string
> wxString connstr;
> - if (!server.IsEmpty()) {
> + if (!hostip.IsEmpty()) {
> connstr.Append(wxT(" hostaddr="));
> connstr.Append(hostip);
> }
>
>
> --
> Dominique QUATRAVAUX Ingénieur senior
> 01 44 42 00 08 IDEALX
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>

Browse pgadmin-support by date

  From Date Subject
Next Message Mario M. Yllescas J. 2005-04-14 15:46:17 Query
Previous Message Devrim GUNDUZ 2005-04-14 15:09:15 Re: RedHat with Postgres 8