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

From: Arcady Genkin <a(dot)genkin(at)utoronto(dot)ca>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Postgres-general <pgsql-general(at)postgresql(dot)org>
Subject: 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 20:42:31
Message-ID: r1z7kyhtop4.fsf_-_@gnu.cdf.toronto.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Arcady Genkin <a(dot)genkin(at)utoronto(dot)ca> writes:
> > Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> > Can I redefine location of the UNIX domain socket file to be other
> > than /tmp/.s.PGSQL.5432?
> >>
> >> Yes, in 7.1 this is a supported option. See unix_socket_directory
> >> parameter.
>
> > Thanks a lot, this is what I was looking for. I have another
> > question, though: how are the clients (mod_php4 for e.g.) going to
> > know the non-standard location of the socket file?
>
> 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?
I wonder if there is a way to tell the PHP script where the socket
is... The documentation of pg_connect() function is not exhaustive:
there is an "options" field for connection, but nowhere does it
explain syntax of specifying the options, nor what sort of options it
is expecting.
http://www.php.net/manual/en/function.pg-connect.php

Is there anyone knowledgeable with PHP in here? PHP's mailing lists
have been down for a few weeks because of transition to new server
or something else.

Many thanks,
--
Arcady Genkin
i=1; while 1, hilb(i); i=i+1; end

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2001-06-12 21:39:51 Re: PHP's pg_connect() and non-standard location of the socket (was: REPOST: redefining location of the socket file /tmp/.s.PGSQL.5432)
Previous Message Tom Lane 2001-06-12 20:17:42 Re: REPOST: redefining location of the socket file /tmp/.s.PGSQL.5432

Browse pgsql-general by date

  From Date Subject
Next Message Thalis A. Kalfigopoulos 2001-06-12 20:55:56 Re: Please help! Functions passing records between them
Previous Message Thalis A. Kalfigopoulos 2001-06-12 20:42:05 Re: Function returning record