Re: connect to postgres server without internet connection

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Reynard Hilman <reynardmh(at)lightsky(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: connect to postgres server without internet connection
Date: 2003-03-31 21:09:31
Message-ID: Pine.LNX.4.33.0303311408530.12855-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 31 Mar 2003, Reynard Hilman wrote:

>
> Hi everyone,
>
> Is it possible to connect to a postgres server without TCP/IP connection
> from a php script (ie: using unix domain socket) ?
> If php cannot do this, do I have to use libpq C library? or is there any
> other way to do it?

On the same box, yes. Just don't include a host entry in your connect
function:

$conn = pg_connect("user=bubba dbname=bo_bob_brain");

should work.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Beutin 2003-03-31 21:14:16 Re: connect to postgres server without internet connection with php script
Previous Message Reynard Hilman 2003-03-31 20:44:36 connect to postgres server without internet connection with php script