Skip site navigation (1) Skip section navigation (2)

Re: location of Unix socket

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>, Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: location of Unix socket
Date: 2000-11-27 20:09:46
Message-ID: (view raw or whole thread)
Lists: pgsql-hackers
> Bruce Momjian writes:
> > Done.  I did not change PQunixsocket or the unixsocket PQconnectdb
> > connection option.  Should they be changed too?
> They should be removed because PQhost does this now.

I assume you mean PQunixsocket.  As part of the database connection, if
pghost begins with a slash, the value is assigned to pgunixsocket and
pghost is cleared.  Here is the code:

    /* ----------
     * Allow unix socket specification in the host name
     * ----------
    if (conn->pghost && conn->pghost[0] == '/') 
        if (conn->pgunixsocket)
        conn->pgunixsocket = conn->pghost;  
        conn->pghost = NULL;

Am I handling this properly?  I hate to be dragging around the unix
socket directory name in pghost for too long and hate to be propogating
the slash test throughout the code.

  Bruce Momjian                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to


pgsql-hackers by date

Next:From: Cyril VELTERDate: 2000-11-27 20:36:40
Subject: Re: Initdb not running on beos
Previous:From: Alvaro HerreraDate: 2000-11-27 19:42:29
Subject: [GENERAL] DROP TABLE, and children? (fwd)

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group