Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
98e195d2
Commit
98e195d2
authored
Nov 22, 2000
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make socket option specify just the directory, not the full path.
parent
9bc6fb37
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
42 additions
and
46 deletions
+42
-46
doc/src/sgml/libpq++.sgml
doc/src/sgml/libpq++.sgml
+5
-5
doc/src/sgml/libpq.sgml
doc/src/sgml/libpq.sgml
+5
-6
doc/src/sgml/ref/createdb.sgml
doc/src/sgml/ref/createdb.sgml
+2
-2
doc/src/sgml/ref/createlang.sgml
doc/src/sgml/ref/createlang.sgml
+2
-2
doc/src/sgml/ref/createuser.sgml
doc/src/sgml/ref/createuser.sgml
+2
-2
doc/src/sgml/ref/dropdb.sgml
doc/src/sgml/ref/dropdb.sgml
+2
-2
doc/src/sgml/ref/droplang.sgml
doc/src/sgml/ref/droplang.sgml
+2
-2
doc/src/sgml/ref/dropuser.sgml
doc/src/sgml/ref/dropuser.sgml
+2
-2
doc/src/sgml/ref/pg_dump.sgml
doc/src/sgml/ref/pg_dump.sgml
+2
-2
doc/src/sgml/ref/pg_dumpall.sgml
doc/src/sgml/ref/pg_dumpall.sgml
+2
-2
doc/src/sgml/ref/pg_restore.sgml
doc/src/sgml/ref/pg_restore.sgml
+1
-1
doc/src/sgml/ref/postmaster.sgml
doc/src/sgml/ref/postmaster.sgml
+3
-4
doc/src/sgml/ref/psql-ref.sgml
doc/src/sgml/ref/psql-ref.sgml
+2
-2
doc/src/sgml/ref/vacuumdb.sgml
doc/src/sgml/ref/vacuumdb.sgml
+2
-2
doc/src/sgml/runtime.sgml
doc/src/sgml/runtime.sgml
+4
-5
src/include/libpq/pqcomm.h
src/include/libpq/pqcomm.h
+4
-5
No files found.
doc/src/sgml/libpq++.sgml
View file @
98e195d2
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.1
8 2000/11/13 15:18:07
momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.1
9 2000/11/22 01:41:12
momjian Exp $
-->
<chapter id="libpqplusplus">
...
...
@@ -80,8 +80,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.18 2000/11/13 15:18:
<listitem>
<para>
<envar>PGHOST</envar> sets the default server name.
If a non-zero-length string is specified, TCP/IP communication is used.
Without a host name, libpq will connect using a local U
nix domain socket.
If it begins with a slash, it is used
as the directory for the u
nix domain socket.
</para>
</listitem>
<listitem>
...
...
@@ -93,8 +93,8 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.18 2000/11/13 15:18:
</listitem>
<listitem>
<para>
<envar>PGUNIXSOCKET</envar> sets the
full
Unix domain socket
file name
for communicating with the <productname>Postgres</productname>
<envar>PGUNIXSOCKET</envar> sets the Unix domain socket
directory
for communicating with the <productname>Postgres</productname>
backend.
</para>
</listitem>
...
...
doc/src/sgml/libpq.sgml
View file @
98e195d2
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.4
7 2000/11/14 01:53:37
momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.4
8 2000/11/22 01:41:12
momjian Exp $
-->
<chapter id="libpq-chapter">
...
...
@@ -90,7 +90,7 @@ PGconn *PQconnectdb(const char *conninfo)
Name of host to connect to.
Using this parameter causes a hostname look-up. See hostaddr.
If it begins with a slash, it is used
as the
path to a
unix domain socket.
as the
directory for the
unix domain socket.
</para>
</listitem>
</varlistentry>
...
...
@@ -138,7 +138,7 @@ PGconn *PQconnectdb(const char *conninfo)
<term><literal>unixsocket</literal></term>
<listitem>
<para>
Full path to Unix-domain socket file to connect to at the server host
.
Directory for Unix-domain socket file
.
</para>
</listitem>
</varlistentry>
...
...
@@ -567,7 +567,7 @@ char *PQport(const PGconn *conn)
<listitem>
<para>
<function>PQunixsocket</function>
Returns the
name
of the Unix-domain socket of the connection.
Returns the
directory
of the Unix-domain socket of the connection.
<synopsis>
char *PQunixsocket(const PGconn *conn)
</synopsis>
...
...
@@ -1839,9 +1839,8 @@ application programs.
<listitem>
<para>
<envar>PGHOST</envar> sets the default server name.
If it beings with a slash, it is used as the
path to a
unix domain
If it beings with a slash, it is used as the
directory for the
unix domain
socket.
Without a host name, libpq will connect using a local Unix domain socket.
</para>
</listitem>
<listitem>
...
...
doc/src/sgml/ref/createdb.sgml
View file @
98e195d2
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createdb.sgml,v 1.1
4 2000/11/13 23:57:19
momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createdb.sgml,v 1.1
5 2000/11/22 01:41:13
momjian Exp $
Postgres documentation
-->
...
...
@@ -41,7 +41,7 @@ Postgres documentation
Specifies the hostname of the machine on which the
<application>postmaster</application>
is running. If host begins with a slash, it is used
as the
path to a
unix domain socket.
as the
directory for the
unix domain socket.
</para>
</listitem>
</varlistentry>
...
...
doc/src/sgml/ref/createlang.sgml
View file @
98e195d2
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v 1.1
3 2000/11/13 23:57:19
momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v 1.1
4 2000/11/22 01:41:13
momjian Exp $
Postgres documentation
-->
...
...
@@ -86,7 +86,7 @@ Postgres documentation
Specifies the hostname of the machine on which the
<application>postmaster</application>
is running. If host begins with a slash, it is used
as the
path to a
unix domain socket.
as the
directory for the
unix domain socket.
</para>
</listitem>
</varlistentry>
...
...
doc/src/sgml/ref/createuser.sgml
View file @
98e195d2
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v 1.1
3 2000/11/13 23:57:19
momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v 1.1
4 2000/11/22 01:41:13
momjian Exp $
Postgres documentation
-->
...
...
@@ -40,7 +40,7 @@ Postgres documentation
Specifies the hostname of the machine on which the
<application>postmaster</application>
is running. If host begins with a slash, it is used
as the
path to a
unix domain socket.
as the
directory for the
unix domain socket.
</para>
</listitem>
</varlistentry>
...
...
doc/src/sgml/ref/dropdb.sgml
View file @
98e195d2
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropdb.sgml,v 1.
7 2000/11/13 23:57:19
momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropdb.sgml,v 1.
8 2000/11/22 01:41:13
momjian Exp $
Postgres documentation
-->
...
...
@@ -40,7 +40,7 @@ Postgres documentation
Specifies the hostname of the machine on which the
<application>postmaster</application>
is running. If host begins with a slash, it is used
as the
path to a
unix domain socket.
as the
directory for the
unix domain socket.
</para>
</listitem>
</varlistentry>
...
...
doc/src/sgml/ref/droplang.sgml
View file @
98e195d2
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/droplang.sgml,v 1.
7 2000/11/13 23:57:19
momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/droplang.sgml,v 1.
8 2000/11/22 01:41:13
momjian Exp $
Postgres documentation
-->
...
...
@@ -86,7 +86,7 @@ Postgres documentation
Specifies the hostname of the machine on which the
<application>postmaster</application>
is running. If host begins with a slash, it is used
as the
path to a
unix domain socket.
as the
directory for the
unix domain socket.
</para>
</listitem>
</varlistentry>
...
...
doc/src/sgml/ref/dropuser.sgml
View file @
98e195d2
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropuser.sgml,v 1.
8 2000/11/13 23:57:20
momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropuser.sgml,v 1.
9 2000/11/22 01:41:13
momjian Exp $
Postgres documentation
-->
...
...
@@ -40,7 +40,7 @@ Postgres documentation
Specifies the hostname of the machine on which the
<application>postmaster</application>
is running. If host begins with a slash, it is used
as the
path to a
unix domain socket.
as the
directory for the
unix domain socket.
</para>
</listitem>
</varlistentry>
...
...
doc/src/sgml/ref/pg_dump.sgml
View file @
98e195d2
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.2
4 2000/11/21 15:39:09 pjw
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.2
5 2000/11/22 01:41:13 momjian
Exp $
Postgres documentation
-->
...
...
@@ -323,7 +323,7 @@ pg_dump [ -h <replaceable class="parameter">host</replaceable> ]
Specifies the hostname of the machine on which the
<application>postmaster</application>
is running. If host begins with a slash, it is used
as the
path to a
unix domain socket.
as the
directory for the
unix domain socket.
</para>
</listitem>
</varlistentry>
...
...
doc/src/sgml/ref/pg_dumpall.sgml
View file @
98e195d2
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.1
4 2000/11/13 23:57:20
momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.1
5 2000/11/22 01:41:13
momjian Exp $
Postgres documentation
-->
...
...
@@ -144,7 +144,7 @@ pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replac
Specifies the hostname of the machine on which the
<application>postmaster</application>
is running. If host begins with a slash, it is used
as the
path to a
unix domain socket.
as the
directory for the
unix domain socket.
</para>
</listitem>
</varlistentry>
...
...
doc/src/sgml/ref/pg_restore.sgml
View file @
98e195d2
...
...
@@ -308,7 +308,7 @@ pg_restore [ <replaceable class="parameter">archive-file</replaceable> ]
Specifies the hostname of the machine on which the
<application>postmaster</application>
is running. If host begins with a slash, it is used
as the
path to a
unix domain socket.
as the
directory for the
unix domain socket.
</para>
</listitem>
</varlistentry>
...
...
doc/src/sgml/ref/postmaster.sgml
View file @
98e195d2
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.1
5 2000/11/14 18:11:31 petere
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/postmaster.sgml,v 1.1
6 2000/11/22 01:41:13 momjian
Exp $
Postgres documentation
-->
...
...
@@ -188,13 +188,12 @@ Postgres documentation
<term>-k <replaceable class="parameter">filename</replaceable></term>
<listitem>
<para>
Specifies the
Unix domain socket file name
on which the
Specifies the
directory for Unix domain socket
on which the
<application>postmaster</application> is to listen for
connections from client applications. Defaults to the value
of the <envar>PGUNIXSOCKET</envar> environment variable, or if
<envar>PGUNIXSOCKET</envar> is not set, then defaults to a
file in <filename>/tmp</filename> constructed from the port
number.
file in <filename>/tmp</filename>.
</para>
</listitem>
</varlistentry>
...
...
doc/src/sgml/ref/psql-ref.sgml
View file @
98e195d2
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.4
3 2000/11/13 23:57:20
momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.4
4 2000/11/22 01:41:13
momjian Exp $
Postgres documentation
-->
...
...
@@ -1323,7 +1323,7 @@ Access permissions for database "test"
Specifies the host name of the machine on which the
<application>postmaster</application> is running.
If host begins with a slash, it is used
as the
path to a
unix domain socket.
as the
directory for the
unix domain socket.
</para>
</listitem>
</varlistentry>
...
...
doc/src/sgml/ref/vacuumdb.sgml
View file @
98e195d2
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.1
3 2000/11/13 23:57:20
momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.1
4 2000/11/22 01:41:13
momjian Exp $
Postgres documentation
-->
...
...
@@ -120,7 +120,7 @@ Postgres documentation
Specifies the hostname of the machine on which the
<application>postmaster</application>
is running. If host begins with a slash, it is used
as the
path to a
unix domain socket.
as the
directory for the
unix domain socket.
</para>
</listitem>
</varlistentry>
...
...
doc/src/sgml/runtime.sgml
View file @
98e195d2
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.3
7 2000/11/15 18:36:03 petere
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.3
8 2000/11/22 01:41:12 momjian
Exp $
-->
<Chapter Id="runtime">
...
...
@@ -1063,13 +1063,12 @@ env PGOPTIONS='-c geqo=off' psql
<term>UNIXSOCKET (<type>string</type>)</term>
<listitem>
<para>
Specifies the
Unix domain socket file name
on which the
Specifies the
directory of the Unix domain socket
on which the
<application>postmaster</application> is to listen for
connections from client applications. Defaults to the value
of the <envar>PGUNIXSOCKET</envar> environment variable, or if
<envar>PGUNIXSOCKET</envar> is not set, then defaults to a
file in <filename>/tmp</filename> constructed from the port
number.
<envar>PGUNIXSOCKET</envar> is not set, then defaults to
<filename>/tmp</filename>.
</para>
</listitem>
</varlistentry>
...
...
src/include/libpq/pqcomm.h
View file @
98e195d2
...
...
@@ -9,7 +9,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: pqcomm.h,v 1.4
5 2000/11/15 18:36:06 petere
Exp $
* $Id: pqcomm.h,v 1.4
6 2000/11/22 01:41:14 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -51,17 +51,16 @@ typedef union SockAddr
/* Configure the UNIX socket address for the well known port. */
#if defined(SUN_LEN)
#define UNIXSOCK_PATH(sun,port,defpath) \
((defpath && defpath[0] != '\0') ? (strncpy((sun).sun_path, defpath, sizeof((sun).sun_path)), (sun).sun_path[sizeof((sun).sun_path)-1] = '\0') : sprintf((sun).sun_path, "/tmp/.s.PGSQL.%d", (port)))
#define UNIXSOCK_LEN(sun) \
(SUN_LEN(&(sun)))
#else
#define UNIXSOCK_PATH(sun,port,defpath) \
((defpath && defpath[0] != '\0') ? (strncpy((sun).sun_path, defpath, sizeof((sun).sun_path)), (sun).sun_path[sizeof((sun).sun_path)-1] = '\0') : sprintf((sun).sun_path, "/tmp/.s.PGSQL.%d", (port)))
#define UNIXSOCK_LEN(sun) \
(strlen((sun).sun_path)+ offsetof(struct sockaddr_un, sun_path))
#endif
#define UNIXSOCK_PATH(sun,port,defpath) \
(snprintf((sun).sun_path, UNIXSOCK_LEN(sun), "%s/.s.PGSQL.%d", (defpath && *(defpath) != '\0') ? (defpath) : "/tmp", (port)))
/*
* We do this because sun_len is in BSD's struct, while others don't.
* We never actually set BSD's sun_len, and I can't think of a
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment