Re: PHP's pg_connect() and non-standard location of the socket (was: REPOST: redefining location of the socket file /tmp/.s.PGSQL.5432)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Arcady Genkin <a(dot)genkin(at)utoronto(dot)ca>
Cc: Postgres-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: PHP's pg_connect() and non-standard location of the socket (was: REPOST: redefining location of the socket file /tmp/.s.PGSQL.5432)
Date: 2001-06-12 21:39:51
Message-ID: 14069.992381991@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

Arcady Genkin <a(dot)genkin(at)utoronto(dot)ca> writes:
>> They're not, unless you tell them, which is why runtime setting of the
>> parameter isn't all that useful IMHO. But some people wanted it, so
>> there it is.

> Hmm... How would I tell that to `psql'? Via "-v" parameter?

IIRC, a hostname parameter that starts with '/' is now interpreted as
a socket path. So you'd do psql -h /path/to/something, or set PGHOST,
to inform the client about a nonstandard socket location.

$ psql -h /nowhere -p 7654
psql: connectDBStart() -- connect() failed: No such file or directory
Is the postmaster running locally
and accepting connections on Unix socket '/nowhere/.s.PGSQL.7654'?

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2001-06-12 21:48:02 failed connect from ecpg destroys evidence of failure
Previous Message Arcady Genkin 2001-06-12 20:42:31 PHP's pg_connect() and non-standard location of the socket (was: REPOST: redefining location of the socket file /tmp/.s.PGSQL.5432)

Browse pgsql-general by date

  From Date Subject
Next Message Martin Weinberg 2001-06-12 21:49:08 Merge join exhausting swap space
Previous Message Christopher Zach 2001-06-12 20:57:56 Re: rtree index very large