Re: TCP/IP Sockets, UNIX Sockets

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Daniel Åkerud <zilch(at)home(dot)se>
Cc: PostgreSQL-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: TCP/IP Sockets, UNIX Sockets
Date: 2001-06-23 18:46:58
Message-ID: Pine.LNX.4.30.0106232044590.724-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Daniel Åkerud writes:

> What I means was, using the C API for PostgreSQL, how can I choose whether I
> want to use UNIX Sockets or regular TCP/IP Socktets? On MySQL I write either
> 127.0.0.1 for TCP/IP or "localhost" for UNIX Sockets.

Please peruse the description at
http://www.de.postgresql.org/devel-corner/docs/postgres/libpq.html#LIBPQ-CONNECT.

In particular look for the "host" parameter. If it's empty or starts with
a slash, then it's a unix domain socket, otherwise it's TCP/IP. (Note
that "localhost" is TCP/IP in libpq.)

--
Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bryan Field-Elliot 2001-06-23 19:36:53 Laughable attempt at an insult from the MySQL crowd...
Previous Message Tom Lane 2001-06-23 17:17:27 Re: [GENERAL] Multiple Indexing, performance impact