Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitebd61ac

Browse files
committed
Remove -k unix socketpath option from client side, allow hostname with
leading slash to behave as a unix socket path.
1 parentd63a762 commitebd61ac

32 files changed

+82
-304
lines changed

‎doc/src/sgml/libpq.sgml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.45 2000/11/1315:18:07 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.46 2000/11/1323:37:51 momjian Exp $
33
-->
44

55
<chapter id="libpq-chapter">
@@ -1844,9 +1844,9 @@ Without a host name, libpq will connect using a local Unix domain socket.
18441844
</listitem>
18451845
<listitem>
18461846
<para>
1847-
<envar>PGPORT</envar> setsthe default port or local Unix domain socket
1848-
file extension for communicating with the <productname>Postgres</productname>
1849-
backend.
1847+
<envar>PGPORT</envar>and <envar>PGUNIXSOCKET</envar> setthe default
1848+
port or local Unix domain socketfile extension for communicating with
1849+
the <productname>Postgres</productname>backend.
18501850
</para>
18511851
</listitem>
18521852
<listitem>

‎doc/src/sgml/ref/createdb.sgml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createdb.sgml,v 1.12 2000/11/1315:18:08 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createdb.sgml,v 1.13 2000/11/1323:37:51 momjian Exp $
33
Postgres documentation
44
-->
55

@@ -56,18 +56,6 @@ Postgres documentation
5656
</listitem>
5757
</varlistentry>
5858

59-
<varlistentry>
60-
<term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term>
61-
<listitem>
62-
<para>
63-
Specifies the Unix-domain socket on which the
64-
<application>postmaster</application> is running.
65-
Without this option, the socket is created in <filename>/tmp</filename>
66-
based on the port number.
67-
</para>
68-
</listitem>
69-
</varlistentry>
70-
7159
<varlistentry>
7260
<term>-U, --username <replaceable class="parameter">username</replaceable></term>
7361
<listitem>

‎doc/src/sgml/ref/createlang.sgml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v 1.11 2000/11/1315:18:08 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v 1.12 2000/11/1323:37:51 momjian Exp $
33
Postgres documentation
44
-->
55

@@ -101,18 +101,6 @@ Postgres documentation
101101
</listitem>
102102
</varlistentry>
103103

104-
<varlistentry>
105-
<term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term>
106-
<listitem>
107-
<para>
108-
Specifies the Unix-domain socket on which the
109-
<application>postmaster</application> is running.
110-
Without this option, the socket is created in <filename>/tmp</filename>
111-
based on the port number.
112-
</para>
113-
</listitem>
114-
</varlistentry>
115-
116104
<varlistentry>
117105
<term>-U, --username <replaceable class="parameter">username</replaceable></term>
118106
<listitem>

‎doc/src/sgml/ref/createuser.sgml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v 1.11 2000/11/1315:18:08 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v 1.12 2000/11/1323:37:51 momjian Exp $
33
Postgres documentation
44
-->
55

@@ -55,18 +55,6 @@ Postgres documentation
5555
</listitem>
5656
</varlistentry>
5757

58-
<varlistentry>
59-
<term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term>
60-
<listitem>
61-
<para>
62-
Specifies the Unix-domain socket on which the
63-
<application>postmaster</application> is running.
64-
Without this option, the socket is created in <filename>/tmp</filename>
65-
based on the port number.
66-
</para>
67-
</listitem>
68-
</varlistentry>
69-
7058
<varlistentry>
7159
<term>-e, --echo</term>
7260
<listitem>

‎doc/src/sgml/ref/dropdb.sgml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropdb.sgml,v 1.5 2000/11/1315:18:08 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropdb.sgml,v 1.6 2000/11/1323:37:51 momjian Exp $
33
Postgres documentation
44
-->
55

@@ -55,18 +55,6 @@ Postgres documentation
5555
</listitem>
5656
</varlistentry>
5757

58-
<varlistentry>
59-
<term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term>
60-
<listitem>
61-
<para>
62-
Specifies the Unix-domain socket on which the
63-
<application>postmaster</application> is running.
64-
Without this option, the socket is created in <filename>/tmp</filename>
65-
based on the port number.
66-
</para>
67-
</listitem>
68-
</varlistentry>
69-
7058
<varlistentry>
7159
<term>-U, --username <replaceable class="parameter">username</replaceable></term>
7260
<listitem>

‎doc/src/sgml/ref/droplang.sgml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/droplang.sgml,v 1.5 2000/11/1315:18:08 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/droplang.sgml,v 1.6 2000/11/1323:37:51 momjian Exp $
33
Postgres documentation
44
-->
55

@@ -101,18 +101,6 @@ Postgres documentation
101101
</listitem>
102102
</varlistentry>
103103

104-
<varlistentry>
105-
<term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term>
106-
<listitem>
107-
<para>
108-
Specifies the Unix-domain socket on which the
109-
<application>postmaster</application> is running.
110-
Without this option, the socket is created in <filename>/tmp</filename>
111-
based on the port number.
112-
</para>
113-
</listitem>
114-
</varlistentry>
115-
116104
<varlistentry>
117105
<term>-U, --username <replaceable class="parameter">username</replaceable></term>
118106
<listitem>

‎doc/src/sgml/ref/dropuser.sgml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropuser.sgml,v 1.6 2000/11/1315:18:08 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropuser.sgml,v 1.7 2000/11/1323:37:51 momjian Exp $
33
Postgres documentation
44
-->
55

@@ -55,18 +55,6 @@ Postgres documentation
5555
</listitem>
5656
</varlistentry>
5757

58-
<varlistentry>
59-
<term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term>
60-
<listitem>
61-
<para>
62-
Specifies the Unix-domain socket on which the
63-
<application>postmaster</application> is running.
64-
Without this option, the socket is created in <filename>/tmp</filename>
65-
based on the port number.
66-
</para>
67-
</listitem>
68-
</varlistentry>
69-
7058
<varlistentry>
7159
<term>-e, --echo</term>
7260
<listitem>

‎doc/src/sgml/ref/pg_dump.sgml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.21 2000/11/1315:18:08 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.22 2000/11/1323:37:51 momjian Exp $
33
Postgres documentation
44
-->
55

@@ -25,7 +25,6 @@ Postgres documentation
2525
<synopsis>
2626
pg_dump [ <replaceable class="parameter">dbname</replaceable> ]
2727
pg_dump [ -h <replaceable class="parameter">host</replaceable> ]
28-
[ -k <replaceable class="parameter">path</replaceable> ]
2928
[ -p <replaceable class="parameter">port</replaceable> ]
3029
[ -t <replaceable class="parameter">table</replaceable> ]
3130
[ -a ] [ -c ] [ -d ] [ -D ] [ -i ] [ -n ] [ -N ]
@@ -206,21 +205,6 @@ pg_dump [ -h <replaceable class="parameter">host</replaceable> ]
206205
</listitem>
207206
</varlistentry>
208207

209-
<varlistentry>
210-
<term>-k <replaceable class="parameter">path</replaceable></term>
211-
<listitem>
212-
<para>
213-
Specifies the local Unix domain socket file path
214-
on which the <application>postmaster</application>
215-
is listening for connections.
216-
Without this option, the socket path name defaults to
217-
the value of the <envar>PGUNIXSOCKET</envar> environment
218-
variable (if set), otherwise it is constructed
219-
from the port number.
220-
</para>
221-
</listitem>
222-
</varlistentry>
223-
224208
<varlistentry>
225209
<term>-p <replaceable class="parameter">port</replaceable></term>
226210
<listitem>

‎doc/src/sgml/ref/pg_dumpall.sgml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.12 2000/11/1315:18:08 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.13 2000/11/1323:37:51 momjian Exp $
33
Postgres documentation
44
-->
55

@@ -23,7 +23,7 @@ Postgres documentation
2323
<date>1999-07-20</date>
2424
</refsynopsisdivinfo>
2525
<synopsis>
26-
pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -k <replaceable class="parameter">path</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ] [ -a ] [ -d ] [ -D ] [ -O ] [ -s ] [ -u ] [ -v ] [ -x ] [ --accounts-only ]
26+
pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ] [ -a ] [ -d ] [ -D ] [ -O ] [ -s ] [ -u ] [ -v ] [ -x ] [ --accounts-only ]
2727
</synopsis>
2828

2929
<refsect2 id="R2-APP-PG-DUMPALL-1">
@@ -149,21 +149,6 @@ pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -k <replac
149149
</listitem>
150150
</varlistentry>
151151

152-
<varlistentry>
153-
<term>-k <replaceable class="parameter">path</replaceable></term>
154-
<listitem>
155-
<para>
156-
Specifies the local Unix domain socket file path
157-
on which the <application>postmaster</application>
158-
is listening for connections.
159-
Without this option, the socket path name defaults to
160-
the value of the <envar>PGUNIXSOCKET</envar> environment
161-
variable (if set), otherwise it is constructed
162-
from the port number.
163-
</para>
164-
</listitem>
165-
</varlistentry>
166-
167152
<varlistentry>
168153
<term>-p <replaceable class="parameter">port</replaceable></term>
169154
<listitem>

‎doc/src/sgml/ref/psql-ref.sgml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.41 2000/11/1315:18:08 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.42 2000/11/1323:37:51 momjian Exp $
33
Postgres documentation
44
-->
55

@@ -1329,19 +1329,6 @@ Access permissions for database "test"
13291329
</varlistentry>
13301330

13311331

1332-
<varlistentry>
1333-
<term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term>
1334-
<listitem>
1335-
<para>
1336-
Specifies the Unix-domain socket on which the
1337-
<application>postmaster</application> is running.
1338-
Without this option, the socket is created in <filename>/tmp</filename>
1339-
based on the port number.
1340-
</para>
1341-
</listitem>
1342-
</varlistentry>
1343-
1344-
13451332
<varlistentry>
13461333
<term>-H, --html</term>
13471334
<listitem>

‎doc/src/sgml/ref/vacuumdb.sgml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.11 2000/11/1315:18:08 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.12 2000/11/1323:37:51 momjian Exp $
33
Postgres documentation
44
-->
55

@@ -136,18 +136,6 @@ Postgres documentation
136136
</listitem>
137137
</varlistentry>
138138

139-
<varlistentry>
140-
<term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term>
141-
<listitem>
142-
<para>
143-
Specifies the Unix-domain socket on which the
144-
<application>postmaster</application> is running.
145-
Without this option, the socket is created in <filename>/tmp</filename>
146-
based on the port number.
147-
</para>
148-
</listitem>
149-
</varlistentry>
150-
151139
<varlistentry>
152140
<term>-U <replaceable class="parameter">username</replaceable></term>
153141
<term>--username <replaceable class="parameter">username</replaceable></term>

‎src/backend/postmaster/postmaster.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.183 2000/11/1315:18:11 momjian Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.184 2000/11/1323:37:52 momjian Exp $
1515
*
1616
* NOTES
1717
*
@@ -1334,8 +1334,8 @@ get_host_port(void)
13341334
{
13351335
charmsg[1024];
13361336
snprintf(msg,sizeof(msg),
1337-
"FATAL: get_host_port: gethostbyname(%s) failed: %s\n",
1338-
HostName,hstrerror(h_errno));
1337+
"FATAL: get_host_port: gethostbyname(%s) failed\n",
1338+
HostName);
13391339
fputs(msg,stderr);
13401340
pqdebug("%s",msg);
13411341
exit(1);

‎src/bin/pg_dump/pg_backup.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,8 @@ typedef struct _restoreOptions {
9999

100100
intuseDB;
101101
char*dbname;
102-
char*pghost;
103102
char*pgport;
104-
char*pgunixsocket;
103+
char*pghost;
105104
intignoreVersion;
106105
intrequirePassword;
107106

@@ -123,7 +122,6 @@ PGconn* ConnectDatabase(Archive *AH,
123122
constchar*dbname,
124123
constchar*pghost,
125124
constchar*pgport,
126-
constchar*pgunixsocket,
127125
constintreqPwd,
128126
constintignoreVersion);
129127

‎src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,8 @@ void RestoreArchive(Archive* AHX, RestoreOptions *ropt)
131131
if (AH->version<K_VERS_1_3)
132132
die_horribly(AH,"Direct database connections are not supported in pre-1.3 archives");
133133

134-
ConnectDatabase(AHX,ropt->dbname,ropt->pghost,ropt->pgport,
135-
ropt->pgunixsocket,ropt->requirePassword,
136-
ropt->ignoreVersion);
134+
ConnectDatabase(AHX,ropt->dbname,ropt->pghost,ropt->pgport,
135+
ropt->requirePassword,ropt->ignoreVersion);
137136

138137
/*
139138
* If no superuser was specified then see if the current user will do...

‎src/bin/pg_dump/pg_backup_archiver.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ typedef struct _archiveHandle {
187187
char*archdbname;/* DB name *read* from archive */
188188
char*pghost;
189189
char*pgport;
190-
char*pgunixsocket;
191190
PGconn*connection;
192191
PGconn*blobConnection;/* Connection for BLOB xref */
193192
inttxActive;/* Flag set if TX active on connection */

‎src/bin/pg_dump/pg_backup_db.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ PGconn* ConnectDatabase(Archive *AHX,
273273
constchar*dbname,
274274
constchar*pghost,
275275
constchar*pgport,
276-
constchar*pgunixsocket,
277276
constintreqPwd,
278277
constintignoreVersion)
279278
{
@@ -308,15 +307,6 @@ PGconn* ConnectDatabase(Archive *AHX,
308307
else
309308
AH->pgport=NULL;
310309

311-
if (pgunixsocket!=NULL)
312-
{
313-
AH->pgport=strdup(pgunixsocket);
314-
sprintf(tmp_string,"unixsocket=%s ",AH->pgunixsocket);
315-
strcat(connect_string,tmp_string);
316-
}
317-
else
318-
AH->pgunixsocket=NULL;
319-
320310
sprintf(tmp_string,"dbname=%s ",AH->dbname);
321311
strcat(connect_string,tmp_string);
322312

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp