mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Remove -k unix socketpath option from client side, allow hostname with
leading slash to behave as a unix socket path.
This commit is contained in:
		@@ -1,5 +1,5 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.45 2000/11/13 15:18:07 momjian Exp $
 | 
					$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.46 2000/11/13 23:37:51 momjian Exp $
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 <chapter id="libpq-chapter">
 | 
					 <chapter id="libpq-chapter">
 | 
				
			||||||
@@ -1844,9 +1844,9 @@ Without a host name, libpq will connect using a local Unix domain socket.
 | 
				
			|||||||
</listitem>
 | 
					</listitem>
 | 
				
			||||||
<listitem>
 | 
					<listitem>
 | 
				
			||||||
<para>
 | 
					<para>
 | 
				
			||||||
<envar>PGPORT</envar>  sets the default port or local Unix domain socket
 | 
					<envar>PGPORT</envar> and <envar>PGUNIXSOCKET</envar> set the default
 | 
				
			||||||
file extension for communicating with the <productname>Postgres</productname>
 | 
					port or local Unix domain socket file extension for communicating with
 | 
				
			||||||
backend.
 | 
					the <productname>Postgres</productname> backend.
 | 
				
			||||||
</para>
 | 
					</para>
 | 
				
			||||||
</listitem>
 | 
					</listitem>
 | 
				
			||||||
<listitem>
 | 
					<listitem>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createdb.sgml,v 1.12 2000/11/13 15:18:08 momjian Exp $
 | 
					$Header: /cvsroot/pgsql/doc/src/sgml/ref/createdb.sgml,v 1.13 2000/11/13 23:37:51 momjian Exp $
 | 
				
			||||||
Postgres documentation
 | 
					Postgres documentation
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -56,18 +56,6 @@ Postgres documentation
 | 
				
			|||||||
      </listitem>
 | 
					      </listitem>
 | 
				
			||||||
     </varlistentry>
 | 
					     </varlistentry>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <varlistentry>
 | 
					 | 
				
			||||||
      <term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term>
 | 
					 | 
				
			||||||
      <listitem>
 | 
					 | 
				
			||||||
      <para>
 | 
					 | 
				
			||||||
      Specifies the Unix-domain socket on which the
 | 
					 | 
				
			||||||
      <application>postmaster</application> is running.
 | 
					 | 
				
			||||||
      Without this option, the socket is created in <filename>/tmp</filename>
 | 
					 | 
				
			||||||
      based on the port number.
 | 
					 | 
				
			||||||
      </para>
 | 
					 | 
				
			||||||
      </listitem>
 | 
					 | 
				
			||||||
    </varlistentry>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     <varlistentry>
 | 
					     <varlistentry>
 | 
				
			||||||
      <term>-U, --username <replaceable class="parameter">username</replaceable></term>
 | 
					      <term>-U, --username <replaceable class="parameter">username</replaceable></term>
 | 
				
			||||||
      <listitem>
 | 
					      <listitem>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v 1.11 2000/11/13 15:18:08 momjian Exp $
 | 
					$Header: /cvsroot/pgsql/doc/src/sgml/ref/createlang.sgml,v 1.12 2000/11/13 23:37:51 momjian Exp $
 | 
				
			||||||
Postgres documentation
 | 
					Postgres documentation
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -101,18 +101,6 @@ Postgres documentation
 | 
				
			|||||||
      </listitem>
 | 
					      </listitem>
 | 
				
			||||||
     </varlistentry>
 | 
					     </varlistentry>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <varlistentry>
 | 
					 | 
				
			||||||
      <term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term>
 | 
					 | 
				
			||||||
      <listitem>
 | 
					 | 
				
			||||||
      <para>
 | 
					 | 
				
			||||||
      Specifies the Unix-domain socket on which the
 | 
					 | 
				
			||||||
      <application>postmaster</application> is running.
 | 
					 | 
				
			||||||
      Without this option, the socket is created in <filename>/tmp</filename>
 | 
					 | 
				
			||||||
      based on the port number.
 | 
					 | 
				
			||||||
      </para>
 | 
					 | 
				
			||||||
      </listitem>
 | 
					 | 
				
			||||||
    </varlistentry>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     <varlistentry>
 | 
					     <varlistentry>
 | 
				
			||||||
      <term>-U, --username <replaceable class="parameter">username</replaceable></term>
 | 
					      <term>-U, --username <replaceable class="parameter">username</replaceable></term>
 | 
				
			||||||
      <listitem>
 | 
					      <listitem>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v 1.11 2000/11/13 15:18:08 momjian Exp $
 | 
					$Header: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v 1.12 2000/11/13 23:37:51 momjian Exp $
 | 
				
			||||||
Postgres documentation
 | 
					Postgres documentation
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -55,18 +55,6 @@ Postgres documentation
 | 
				
			|||||||
      </listitem>
 | 
					      </listitem>
 | 
				
			||||||
     </varlistentry>
 | 
					     </varlistentry>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <varlistentry>
 | 
					 | 
				
			||||||
      <term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term>
 | 
					 | 
				
			||||||
      <listitem>
 | 
					 | 
				
			||||||
      <para>
 | 
					 | 
				
			||||||
      Specifies the Unix-domain socket on which the
 | 
					 | 
				
			||||||
      <application>postmaster</application> is running.
 | 
					 | 
				
			||||||
      Without this option, the socket is created in <filename>/tmp</filename>
 | 
					 | 
				
			||||||
      based on the port number.
 | 
					 | 
				
			||||||
      </para>
 | 
					 | 
				
			||||||
      </listitem>
 | 
					 | 
				
			||||||
    </varlistentry>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     <varlistentry>
 | 
					     <varlistentry>
 | 
				
			||||||
      <term>-e, --echo</term>
 | 
					      <term>-e, --echo</term>
 | 
				
			||||||
      <listitem>
 | 
					      <listitem>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropdb.sgml,v 1.5 2000/11/13 15:18:08 momjian Exp $
 | 
					$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropdb.sgml,v 1.6 2000/11/13 23:37:51 momjian Exp $
 | 
				
			||||||
Postgres documentation
 | 
					Postgres documentation
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -55,18 +55,6 @@ Postgres documentation
 | 
				
			|||||||
      </listitem>
 | 
					      </listitem>
 | 
				
			||||||
     </varlistentry>
 | 
					     </varlistentry>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <varlistentry>
 | 
					 | 
				
			||||||
      <term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term>
 | 
					 | 
				
			||||||
      <listitem>
 | 
					 | 
				
			||||||
      <para>
 | 
					 | 
				
			||||||
      Specifies the Unix-domain socket on which the
 | 
					 | 
				
			||||||
      <application>postmaster</application> is running.
 | 
					 | 
				
			||||||
      Without this option, the socket is created in <filename>/tmp</filename>
 | 
					 | 
				
			||||||
      based on the port number.
 | 
					 | 
				
			||||||
      </para>
 | 
					 | 
				
			||||||
      </listitem>
 | 
					 | 
				
			||||||
    </varlistentry>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     <varlistentry>
 | 
					     <varlistentry>
 | 
				
			||||||
      <term>-U, --username <replaceable class="parameter">username</replaceable></term>
 | 
					      <term>-U, --username <replaceable class="parameter">username</replaceable></term>
 | 
				
			||||||
      <listitem>
 | 
					      <listitem>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/droplang.sgml,v 1.5 2000/11/13 15:18:08 momjian Exp $
 | 
					$Header: /cvsroot/pgsql/doc/src/sgml/ref/droplang.sgml,v 1.6 2000/11/13 23:37:51 momjian Exp $
 | 
				
			||||||
Postgres documentation
 | 
					Postgres documentation
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -101,18 +101,6 @@ Postgres documentation
 | 
				
			|||||||
      </listitem>
 | 
					      </listitem>
 | 
				
			||||||
     </varlistentry>
 | 
					     </varlistentry>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <varlistentry>
 | 
					 | 
				
			||||||
      <term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term>
 | 
					 | 
				
			||||||
      <listitem>
 | 
					 | 
				
			||||||
      <para>
 | 
					 | 
				
			||||||
      Specifies the Unix-domain socket on which the
 | 
					 | 
				
			||||||
      <application>postmaster</application> is running.
 | 
					 | 
				
			||||||
      Without this option, the socket is created in <filename>/tmp</filename>
 | 
					 | 
				
			||||||
      based on the port number.
 | 
					 | 
				
			||||||
      </para>
 | 
					 | 
				
			||||||
      </listitem>
 | 
					 | 
				
			||||||
    </varlistentry>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     <varlistentry>
 | 
					     <varlistentry>
 | 
				
			||||||
      <term>-U, --username <replaceable class="parameter">username</replaceable></term>
 | 
					      <term>-U, --username <replaceable class="parameter">username</replaceable></term>
 | 
				
			||||||
      <listitem>
 | 
					      <listitem>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropuser.sgml,v 1.6 2000/11/13 15:18:08 momjian Exp $
 | 
					$Header: /cvsroot/pgsql/doc/src/sgml/ref/dropuser.sgml,v 1.7 2000/11/13 23:37:51 momjian Exp $
 | 
				
			||||||
Postgres documentation
 | 
					Postgres documentation
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -55,18 +55,6 @@ Postgres documentation
 | 
				
			|||||||
      </listitem>
 | 
					      </listitem>
 | 
				
			||||||
     </varlistentry>
 | 
					     </varlistentry>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <varlistentry>
 | 
					 | 
				
			||||||
      <term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term>
 | 
					 | 
				
			||||||
      <listitem>
 | 
					 | 
				
			||||||
      <para>
 | 
					 | 
				
			||||||
      Specifies the Unix-domain socket on which the
 | 
					 | 
				
			||||||
      <application>postmaster</application> is running.
 | 
					 | 
				
			||||||
      Without this option, the socket is created in <filename>/tmp</filename>
 | 
					 | 
				
			||||||
      based on the port number.
 | 
					 | 
				
			||||||
      </para>
 | 
					 | 
				
			||||||
      </listitem>
 | 
					 | 
				
			||||||
    </varlistentry>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     <varlistentry>
 | 
					     <varlistentry>
 | 
				
			||||||
      <term>-e, --echo</term>
 | 
					      <term>-e, --echo</term>
 | 
				
			||||||
      <listitem>
 | 
					      <listitem>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.21 2000/11/13 15:18:08 momjian Exp $
 | 
					$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v 1.22 2000/11/13 23:37:51 momjian Exp $
 | 
				
			||||||
Postgres documentation
 | 
					Postgres documentation
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -25,7 +25,6 @@ Postgres documentation
 | 
				
			|||||||
  <synopsis>
 | 
					  <synopsis>
 | 
				
			||||||
pg_dump [ <replaceable class="parameter">dbname</replaceable> ]
 | 
					pg_dump [ <replaceable class="parameter">dbname</replaceable> ]
 | 
				
			||||||
pg_dump [ -h <replaceable class="parameter">host</replaceable> ]
 | 
					pg_dump [ -h <replaceable class="parameter">host</replaceable> ]
 | 
				
			||||||
    [ -k <replaceable class="parameter">path</replaceable> ]
 | 
					 | 
				
			||||||
    [ -p <replaceable class="parameter">port</replaceable> ]
 | 
					    [ -p <replaceable class="parameter">port</replaceable> ]
 | 
				
			||||||
    [ -t <replaceable class="parameter">table</replaceable> ]
 | 
					    [ -t <replaceable class="parameter">table</replaceable> ]
 | 
				
			||||||
    [ -a ] [ -c ] [ -d ] [ -D ] [ -i ] [ -n ] [ -N ]
 | 
					    [ -a ] [ -c ] [ -d ] [ -D ] [ -i ] [ -n ] [ -N ]
 | 
				
			||||||
@@ -206,21 +205,6 @@ pg_dump [ -h <replaceable class="parameter">host</replaceable> ]
 | 
				
			|||||||
      </listitem>
 | 
					      </listitem>
 | 
				
			||||||
     </varlistentry>
 | 
					     </varlistentry>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
     <varlistentry>
 | 
					 | 
				
			||||||
      <term>-k <replaceable class="parameter">path</replaceable></term>
 | 
					 | 
				
			||||||
      <listitem>
 | 
					 | 
				
			||||||
       <para>
 | 
					 | 
				
			||||||
	Specifies the local Unix domain socket file path
 | 
					 | 
				
			||||||
	on which the <application>postmaster</application>
 | 
					 | 
				
			||||||
	is listening for connections.
 | 
					 | 
				
			||||||
        Without this option, the socket path name defaults to
 | 
					 | 
				
			||||||
        the value of the <envar>PGUNIXSOCKET</envar> environment
 | 
					 | 
				
			||||||
	variable (if set), otherwise it is constructed
 | 
					 | 
				
			||||||
        from the port number.
 | 
					 | 
				
			||||||
       </para>
 | 
					 | 
				
			||||||
      </listitem>
 | 
					 | 
				
			||||||
     </varlistentry>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     <varlistentry>
 | 
					     <varlistentry>
 | 
				
			||||||
      <term>-p <replaceable class="parameter">port</replaceable></term>
 | 
					      <term>-p <replaceable class="parameter">port</replaceable></term>
 | 
				
			||||||
      <listitem>
 | 
					      <listitem>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.12 2000/11/13 15:18:08 momjian Exp $
 | 
					$Header: /cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v 1.13 2000/11/13 23:37:51 momjian Exp $
 | 
				
			||||||
Postgres documentation
 | 
					Postgres documentation
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -23,7 +23,7 @@ Postgres documentation
 | 
				
			|||||||
   <date>1999-07-20</date>
 | 
					   <date>1999-07-20</date>
 | 
				
			||||||
  </refsynopsisdivinfo>
 | 
					  </refsynopsisdivinfo>
 | 
				
			||||||
  <synopsis>
 | 
					  <synopsis>
 | 
				
			||||||
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 ]
 | 
					pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -p <replaceable class="parameter">port</replaceable> ] [ -a ] [ -d ] [ -D ] [ -O ] [ -s ] [ -u ] [ -v ] [ -x ] [ --accounts-only ]
 | 
				
			||||||
  </synopsis>
 | 
					  </synopsis>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  <refsect2 id="R2-APP-PG-DUMPALL-1">
 | 
					  <refsect2 id="R2-APP-PG-DUMPALL-1">
 | 
				
			||||||
@@ -149,21 +149,6 @@ pg_dumpall [ -h <replaceable class="parameter">host</replaceable> ] [ -k <replac
 | 
				
			|||||||
      </listitem>
 | 
					      </listitem>
 | 
				
			||||||
     </varlistentry>
 | 
					     </varlistentry>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
     <varlistentry>
 | 
					 | 
				
			||||||
      <term>-k <replaceable class="parameter">path</replaceable></term>
 | 
					 | 
				
			||||||
      <listitem>
 | 
					 | 
				
			||||||
       <para>
 | 
					 | 
				
			||||||
	Specifies the local Unix domain socket file path
 | 
					 | 
				
			||||||
	on which the <application>postmaster</application>
 | 
					 | 
				
			||||||
	is listening for connections.
 | 
					 | 
				
			||||||
        Without this option, the socket path name defaults to
 | 
					 | 
				
			||||||
        the value of the <envar>PGUNIXSOCKET</envar> environment
 | 
					 | 
				
			||||||
	variable (if set), otherwise it is constructed
 | 
					 | 
				
			||||||
        from the port number.
 | 
					 | 
				
			||||||
       </para>
 | 
					 | 
				
			||||||
      </listitem>
 | 
					 | 
				
			||||||
     </varlistentry>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     <varlistentry>
 | 
					     <varlistentry>
 | 
				
			||||||
      <term>-p <replaceable class="parameter">port</replaceable></term>
 | 
					      <term>-p <replaceable class="parameter">port</replaceable></term>
 | 
				
			||||||
      <listitem>
 | 
					      <listitem>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.41 2000/11/13 15:18:08 momjian Exp $
 | 
					$Header: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.42 2000/11/13 23:37:51 momjian Exp $
 | 
				
			||||||
Postgres documentation
 | 
					Postgres documentation
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1329,19 +1329,6 @@ Access permissions for database "test"
 | 
				
			|||||||
    </varlistentry>
 | 
					    </varlistentry>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <varlistentry>
 | 
					 | 
				
			||||||
      <term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term>
 | 
					 | 
				
			||||||
      <listitem>
 | 
					 | 
				
			||||||
      <para>
 | 
					 | 
				
			||||||
      Specifies the Unix-domain socket on which the
 | 
					 | 
				
			||||||
      <application>postmaster</application> is running.
 | 
					 | 
				
			||||||
      Without this option, the socket is created in <filename>/tmp</filename>
 | 
					 | 
				
			||||||
      based on the port number.
 | 
					 | 
				
			||||||
      </para>
 | 
					 | 
				
			||||||
      </listitem>
 | 
					 | 
				
			||||||
    </varlistentry>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <varlistentry>
 | 
					    <varlistentry>
 | 
				
			||||||
      <term>-H, --html</term>
 | 
					      <term>-H, --html</term>
 | 
				
			||||||
      <listitem>
 | 
					      <listitem>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.11 2000/11/13 15:18:08 momjian Exp $
 | 
					$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuumdb.sgml,v 1.12 2000/11/13 23:37:51 momjian Exp $
 | 
				
			||||||
Postgres documentation
 | 
					Postgres documentation
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -136,18 +136,6 @@ Postgres documentation
 | 
				
			|||||||
      </listitem>
 | 
					      </listitem>
 | 
				
			||||||
     </varlistentry>
 | 
					     </varlistentry>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <varlistentry>
 | 
					 | 
				
			||||||
      <term>-k, --unixsocket <replaceable class="parameter">path</replaceable></term>
 | 
					 | 
				
			||||||
      <listitem>
 | 
					 | 
				
			||||||
      <para>
 | 
					 | 
				
			||||||
      Specifies the Unix-domain socket on which the
 | 
					 | 
				
			||||||
      <application>postmaster</application> is running.
 | 
					 | 
				
			||||||
      Without this option, the socket is created in <filename>/tmp</filename>
 | 
					 | 
				
			||||||
      based on the port number.
 | 
					 | 
				
			||||||
      </para>
 | 
					 | 
				
			||||||
      </listitem>
 | 
					 | 
				
			||||||
    </varlistentry>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
     <varlistentry>
 | 
					     <varlistentry>
 | 
				
			||||||
      <term>-U <replaceable class="parameter">username</replaceable></term>
 | 
					      <term>-U <replaceable class="parameter">username</replaceable></term>
 | 
				
			||||||
      <term>--username <replaceable class="parameter">username</replaceable></term>
 | 
					      <term>--username <replaceable class="parameter">username</replaceable></term>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -11,7 +11,7 @@
 | 
				
			|||||||
 *
 | 
					 *
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * IDENTIFICATION
 | 
					 * IDENTIFICATION
 | 
				
			||||||
 *	  $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.183 2000/11/13 15:18:11 momjian Exp $
 | 
					 *	  $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.184 2000/11/13 23:37:52 momjian Exp $
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * NOTES
 | 
					 * NOTES
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
@@ -1334,8 +1334,8 @@ get_host_port(void)
 | 
				
			|||||||
		{
 | 
							{
 | 
				
			||||||
			char msg[1024];
 | 
								char msg[1024];
 | 
				
			||||||
			snprintf(msg, sizeof(msg),
 | 
								snprintf(msg, sizeof(msg),
 | 
				
			||||||
				 "FATAL: get_host_port: gethostbyname(%s) failed: %s\n",
 | 
									 "FATAL: get_host_port: gethostbyname(%s) failed\n",
 | 
				
			||||||
				 HostName, hstrerror(h_errno));
 | 
									 HostName);
 | 
				
			||||||
			fputs(msg, stderr);
 | 
								fputs(msg, stderr);
 | 
				
			||||||
			pqdebug("%s", msg);
 | 
								pqdebug("%s", msg);
 | 
				
			||||||
			exit(1);
 | 
								exit(1);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -99,9 +99,8 @@ typedef struct _restoreOptions {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	int			useDB;
 | 
						int			useDB;
 | 
				
			||||||
	char		*dbname;
 | 
						char		*dbname;
 | 
				
			||||||
	char		*pghost;
 | 
					 | 
				
			||||||
	char		*pgport;
 | 
						char		*pgport;
 | 
				
			||||||
	char		*pgunixsocket;
 | 
						char		*pghost;
 | 
				
			||||||
	int			ignoreVersion;
 | 
						int			ignoreVersion;
 | 
				
			||||||
	int			requirePassword;
 | 
						int			requirePassword;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -123,7 +122,6 @@ PGconn* ConnectDatabase(Archive *AH,
 | 
				
			|||||||
		const char* 	dbname,
 | 
							const char* 	dbname,
 | 
				
			||||||
		const char*	pghost,
 | 
							const char*	pghost,
 | 
				
			||||||
		const char*	pgport,
 | 
							const char*	pgport,
 | 
				
			||||||
		const char*	pgunixsocket,
 | 
					 | 
				
			||||||
		const int	reqPwd,
 | 
							const int	reqPwd,
 | 
				
			||||||
		const int	ignoreVersion);
 | 
							const int	ignoreVersion);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -132,8 +132,7 @@ void RestoreArchive(Archive* AHX, RestoreOptions *ropt)
 | 
				
			|||||||
			die_horribly(AH, "Direct database connections are not supported in pre-1.3 archives");
 | 
								die_horribly(AH, "Direct database connections are not supported in pre-1.3 archives");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		ConnectDatabase(AHX, ropt->dbname, ropt->pghost, ropt->pgport, 
 | 
							ConnectDatabase(AHX, ropt->dbname, ropt->pghost, ropt->pgport, 
 | 
				
			||||||
							ropt->pgunixsocket, ropt->requirePassword,
 | 
												ropt->requirePassword, ropt->ignoreVersion);
 | 
				
			||||||
							ropt->ignoreVersion);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/*
 | 
							/*
 | 
				
			||||||
		 * If no superuser was specified then see if the current user will do...
 | 
							 * If no superuser was specified then see if the current user will do...
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -187,7 +187,6 @@ typedef struct _archiveHandle {
 | 
				
			|||||||
	char				*archdbname;		/* DB name *read* from archive */
 | 
						char				*archdbname;		/* DB name *read* from archive */
 | 
				
			||||||
	char				*pghost;
 | 
						char				*pghost;
 | 
				
			||||||
	char				*pgport;
 | 
						char				*pgport;
 | 
				
			||||||
	char				*pgunixsocket;
 | 
					 | 
				
			||||||
	PGconn				*connection;
 | 
						PGconn				*connection;
 | 
				
			||||||
	PGconn				*blobConnection;	/* Connection for BLOB xref */
 | 
						PGconn				*blobConnection;	/* Connection for BLOB xref */
 | 
				
			||||||
	int					txActive;			/* Flag set if TX active on connection */
 | 
						int					txActive;			/* Flag set if TX active on connection */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -273,7 +273,6 @@ PGconn* ConnectDatabase(Archive *AHX,
 | 
				
			|||||||
		const char* 	dbname,
 | 
							const char* 	dbname,
 | 
				
			||||||
		const char* 	pghost,
 | 
							const char* 	pghost,
 | 
				
			||||||
		const char* 	pgport,
 | 
							const char* 	pgport,
 | 
				
			||||||
		const char* 	pgunixsocket,
 | 
					 | 
				
			||||||
		const int		reqPwd,
 | 
							const int		reqPwd,
 | 
				
			||||||
		const int		ignoreVersion)
 | 
							const int		ignoreVersion)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@@ -308,15 +307,6 @@ PGconn* ConnectDatabase(Archive *AHX,
 | 
				
			|||||||
	else
 | 
						else
 | 
				
			||||||
	    AH->pgport = NULL;
 | 
						    AH->pgport = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (pgunixsocket != NULL)
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
		AH->pgport = strdup(pgunixsocket);
 | 
					 | 
				
			||||||
		sprintf(tmp_string, "unixsocket=%s ", AH->pgunixsocket);
 | 
					 | 
				
			||||||
		strcat(connect_string, tmp_string);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
	    AH->pgunixsocket = NULL;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	sprintf(tmp_string, "dbname=%s ", AH->dbname);
 | 
						sprintf(tmp_string, "dbname=%s ", AH->dbname);
 | 
				
			||||||
	strcat(connect_string, tmp_string);
 | 
						strcat(connect_string, tmp_string);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,7 +22,7 @@
 | 
				
			|||||||
 *
 | 
					 *
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * IDENTIFICATION
 | 
					 * IDENTIFICATION
 | 
				
			||||||
 *	  $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.178 2000/11/13 15:18:13 momjian Exp $
 | 
					 *	  $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.179 2000/11/13 23:37:52 momjian Exp $
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
 | 
					 * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
@@ -200,7 +200,6 @@ help(const char *progname)
 | 
				
			|||||||
		"  -F, --format {c|f|p}     output file format (custom, files, plain text)\n"
 | 
							"  -F, --format {c|f|p}     output file format (custom, files, plain text)\n"
 | 
				
			||||||
		"  -h, --host <hostname>    server host name\n"
 | 
							"  -h, --host <hostname>    server host name\n"
 | 
				
			||||||
		"  -i, --ignore-version     proceed when database version != pg_dump version\n"
 | 
							"  -i, --ignore-version     proceed when database version != pg_dump version\n"
 | 
				
			||||||
		"  -k, --unixsocket <path>  server Unix-domain socket name\n"
 | 
					 | 
				
			||||||
		"  -n, --no-quotes          suppress most quotes around identifiers\n"
 | 
							"  -n, --no-quotes          suppress most quotes around identifiers\n"
 | 
				
			||||||
		"  -N, --quotes             enable most quotes around identifiers\n"
 | 
							"  -N, --quotes             enable most quotes around identifiers\n"
 | 
				
			||||||
		"  -o, --oids               dump object ids (oids)\n"
 | 
							"  -o, --oids               dump object ids (oids)\n"
 | 
				
			||||||
@@ -227,7 +226,6 @@ help(const char *progname)
 | 
				
			|||||||
		"  -F {c|f|p}               output file format (custom, files, plain text)\n"
 | 
							"  -F {c|f|p}               output file format (custom, files, plain text)\n"
 | 
				
			||||||
		"  -h <hostname>            server host name\n"
 | 
							"  -h <hostname>            server host name\n"
 | 
				
			||||||
		"  -i                       proceed when database version != pg_dump version\n"
 | 
							"  -i                       proceed when database version != pg_dump version\n"
 | 
				
			||||||
		"  -k <path>                server Unix-domain socket name\n"
 | 
					 | 
				
			||||||
		"  -n                       suppress most quotes around identifiers\n"
 | 
							"  -n                       suppress most quotes around identifiers\n"
 | 
				
			||||||
		"  -N                       enable most quotes around identifiers\n"
 | 
							"  -N                       enable most quotes around identifiers\n"
 | 
				
			||||||
		"  -o                       dump object ids (oids)\n"
 | 
							"  -o                       dump object ids (oids)\n"
 | 
				
			||||||
@@ -631,7 +629,6 @@ main(int argc, char **argv)
 | 
				
			|||||||
	const char *dbname = NULL;
 | 
						const char *dbname = NULL;
 | 
				
			||||||
	const char *pghost = NULL;
 | 
						const char *pghost = NULL;
 | 
				
			||||||
	const char *pgport = NULL;
 | 
						const char *pgport = NULL;
 | 
				
			||||||
	const char *pgunixsocket = NULL;
 | 
					 | 
				
			||||||
	char	   *tablename = NULL;
 | 
						char	   *tablename = NULL;
 | 
				
			||||||
	bool		oids = false;
 | 
						bool		oids = false;
 | 
				
			||||||
	TableInfo  *tblinfo;
 | 
						TableInfo  *tblinfo;
 | 
				
			||||||
@@ -661,7 +658,6 @@ main(int argc, char **argv)
 | 
				
			|||||||
		{"attribute-inserts", no_argument, NULL, 'D'},
 | 
							{"attribute-inserts", no_argument, NULL, 'D'},
 | 
				
			||||||
		{"host", required_argument, NULL, 'h'},
 | 
							{"host", required_argument, NULL, 'h'},
 | 
				
			||||||
		{"ignore-version", no_argument, NULL, 'i'},
 | 
							{"ignore-version", no_argument, NULL, 'i'},
 | 
				
			||||||
		{"unixsocket", required_argument, NULL, 'k'},
 | 
					 | 
				
			||||||
		{"no-reconnect", no_argument, NULL, 'R'},
 | 
							{"no-reconnect", no_argument, NULL, 'R'},
 | 
				
			||||||
		{"no-quotes", no_argument, NULL, 'n'},
 | 
							{"no-quotes", no_argument, NULL, 'n'},
 | 
				
			||||||
		{"quotes", no_argument, NULL, 'N'},
 | 
							{"quotes", no_argument, NULL, 'N'},
 | 
				
			||||||
@@ -756,10 +752,6 @@ main(int argc, char **argv)
 | 
				
			|||||||
				ignore_version = true;
 | 
									ignore_version = true;
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			case 'k':			/* server Unix-domain socket */
 | 
					 | 
				
			||||||
				pgunixsocket = optarg;
 | 
					 | 
				
			||||||
				break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			case 'n':			/* Do not force double-quotes on
 | 
								case 'n':			/* Do not force double-quotes on
 | 
				
			||||||
								 * identifiers */
 | 
													 * identifiers */
 | 
				
			||||||
				force_quotes = false;
 | 
									force_quotes = false;
 | 
				
			||||||
@@ -956,8 +948,7 @@ main(int argc, char **argv)
 | 
				
			|||||||
	dbname = argv[optind];
 | 
						dbname = argv[optind];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Open the database using the Archiver, so it knows about it. Errors mean death */
 | 
						/* Open the database using the Archiver, so it knows about it. Errors mean death */
 | 
				
			||||||
	g_conn = ConnectDatabase(g_fout, dbname, pghost, pgport, pgunixsocket,
 | 
						g_conn = ConnectDatabase(g_fout, dbname, pghost, pgport, use_password, ignore_version);
 | 
				
			||||||
							 use_password, ignore_version);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Start serializable transaction to dump consistent data
 | 
						 * Start serializable transaction to dump consistent data
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -101,7 +101,6 @@ struct option cmdopts[] = {
 | 
				
			|||||||
				{ "ignore-version", 0, NULL, 'i'},
 | 
									{ "ignore-version", 0, NULL, 'i'},
 | 
				
			||||||
				{ "index", 2, NULL, 'I'},
 | 
									{ "index", 2, NULL, 'I'},
 | 
				
			||||||
				{ "list", 0, NULL, 'l'},
 | 
									{ "list", 0, NULL, 'l'},
 | 
				
			||||||
				{ "unixsocket", 1, NULL, 'k' },
 | 
					 | 
				
			||||||
				{ "no-acl", 0, NULL, 'x' },
 | 
									{ "no-acl", 0, NULL, 'x' },
 | 
				
			||||||
				{ "no-owner", 0, NULL, 'O'},
 | 
									{ "no-owner", 0, NULL, 'O'},
 | 
				
			||||||
				{ "no-reconnect", 0, NULL, 'R' },
 | 
									{ "no-reconnect", 0, NULL, 'R' },
 | 
				
			||||||
@@ -133,9 +132,9 @@ int main(int argc, char **argv)
 | 
				
			|||||||
	progname = *argv;
 | 
						progname = *argv;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef HAVE_GETOPT_LONG
 | 
					#ifdef HAVE_GETOPT_LONG
 | 
				
			||||||
	while ((c = getopt_long(argc, argv, "acCd:f:F:h:i:k:lNoOp:P:rRsS:t:T:uU:vx", cmdopts, NULL)) != EOF)
 | 
						while ((c = getopt_long(argc, argv, "acCd:f:F:h:i:lNoOp:P:rRsS:t:T:uU:vx", cmdopts, NULL)) != EOF)
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
	while ((c = getopt(argc, argv, "acCd:f:F:h:i:k:lNoOp:P:rRsS:t:T:uU:vx")) != -1)
 | 
						while ((c = getopt(argc, argv, "acCd:f:F:h:i:lNoOp:P:rRsS:t:T:uU:vx")) != -1)
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		switch (c)
 | 
							switch (c)
 | 
				
			||||||
@@ -171,10 +170,6 @@ int main(int argc, char **argv)
 | 
				
			|||||||
			case 'i':
 | 
								case 'i':
 | 
				
			||||||
				opts->ignoreVersion = 1;
 | 
									opts->ignoreVersion = 1;
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
			case 'k':
 | 
					 | 
				
			||||||
				if (strlen(optarg) != 0)
 | 
					 | 
				
			||||||
					opts->pgunixsocket = strdup(optarg);
 | 
					 | 
				
			||||||
				break;
 | 
					 | 
				
			||||||
			case 'N':
 | 
								case 'N':
 | 
				
			||||||
				opts->origOrder = 1;
 | 
									opts->origOrder = 1;
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@
 | 
				
			|||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright 2000 by PostgreSQL Global Development Group
 | 
					 * Copyright 2000 by PostgreSQL Global Development Group
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.37 2000/11/13 15:18:14 momjian Exp $
 | 
					 * $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.38 2000/11/13 23:37:53 momjian Exp $
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include "postgres.h"
 | 
					#include "postgres.h"
 | 
				
			||||||
#include "command.h"
 | 
					#include "command.h"
 | 
				
			||||||
@@ -1202,7 +1202,6 @@ do_connect(const char *new_dbname, const char *new_user)
 | 
				
			|||||||
	SetVariable(pset.vars, "USER", NULL);
 | 
						SetVariable(pset.vars, "USER", NULL);
 | 
				
			||||||
	SetVariable(pset.vars, "HOST", NULL);
 | 
						SetVariable(pset.vars, "HOST", NULL);
 | 
				
			||||||
	SetVariable(pset.vars, "PORT", NULL);
 | 
						SetVariable(pset.vars, "PORT", NULL);
 | 
				
			||||||
	SetVariable(pset.vars, "UNIXSOCKET", NULL);
 | 
					 | 
				
			||||||
	SetVariable(pset.vars, "ENCODING", NULL);
 | 
						SetVariable(pset.vars, "ENCODING", NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* If dbname is "" then use old name, else new one (even if NULL) */
 | 
						/* If dbname is "" then use old name, else new one (even if NULL) */
 | 
				
			||||||
@@ -1232,7 +1231,6 @@ do_connect(const char *new_dbname, const char *new_user)
 | 
				
			|||||||
	do
 | 
						do
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		need_pass = false;
 | 
							need_pass = false;
 | 
				
			||||||
		/* FIXME use PQconnectdb to support passing the Unix socket */
 | 
					 | 
				
			||||||
		pset.db = PQsetdbLogin(PQhost(oldconn), PQport(oldconn),
 | 
							pset.db = PQsetdbLogin(PQhost(oldconn), PQport(oldconn),
 | 
				
			||||||
							   NULL, NULL, dbparam, userparam, pwparam);
 | 
												   NULL, NULL, dbparam, userparam, pwparam);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1309,7 +1307,6 @@ do_connect(const char *new_dbname, const char *new_user)
 | 
				
			|||||||
	SetVariable(pset.vars, "USER", PQuser(pset.db));
 | 
						SetVariable(pset.vars, "USER", PQuser(pset.db));
 | 
				
			||||||
	SetVariable(pset.vars, "HOST", PQhost(pset.db));
 | 
						SetVariable(pset.vars, "HOST", PQhost(pset.db));
 | 
				
			||||||
	SetVariable(pset.vars, "PORT", PQport(pset.db));
 | 
						SetVariable(pset.vars, "PORT", PQport(pset.db));
 | 
				
			||||||
	SetVariable(pset.vars, "UNIXSOCKET", PQunixsocket(pset.db));
 | 
					 | 
				
			||||||
	SetVariable(pset.vars, "ENCODING", pg_encoding_to_char(pset.encoding));
 | 
						SetVariable(pset.vars, "ENCODING", pg_encoding_to_char(pset.encoding));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pset.issuper = test_superuser(PQuser(pset.db));
 | 
						pset.issuper = test_superuser(PQuser(pset.db));
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@
 | 
				
			|||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright 2000 by PostgreSQL Global Development Group
 | 
					 * Copyright 2000 by PostgreSQL Global Development Group
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.24 2000/11/13 15:18:14 momjian Exp $
 | 
					 * $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.25 2000/11/13 23:37:53 momjian Exp $
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include "postgres.h"
 | 
					#include "postgres.h"
 | 
				
			||||||
#include "common.h"
 | 
					#include "common.h"
 | 
				
			||||||
@@ -329,7 +329,6 @@ PSQLexec(const char *query)
 | 
				
			|||||||
			SetVariable(pset.vars, "DBNAME", NULL);
 | 
								SetVariable(pset.vars, "DBNAME", NULL);
 | 
				
			||||||
			SetVariable(pset.vars, "HOST", NULL);
 | 
								SetVariable(pset.vars, "HOST", NULL);
 | 
				
			||||||
			SetVariable(pset.vars, "PORT", NULL);
 | 
								SetVariable(pset.vars, "PORT", NULL);
 | 
				
			||||||
			SetVariable(pset.vars, "UNIXSOCKET", NULL);
 | 
					 | 
				
			||||||
			SetVariable(pset.vars, "USER", NULL);
 | 
								SetVariable(pset.vars, "USER", NULL);
 | 
				
			||||||
			SetVariable(pset.vars, "ENCODING", NULL);
 | 
								SetVariable(pset.vars, "ENCODING", NULL);
 | 
				
			||||||
			return NULL;
 | 
								return NULL;
 | 
				
			||||||
@@ -509,7 +508,6 @@ SendQuery(const char *query)
 | 
				
			|||||||
				SetVariable(pset.vars, "DBNAME", NULL);
 | 
									SetVariable(pset.vars, "DBNAME", NULL);
 | 
				
			||||||
				SetVariable(pset.vars, "HOST", NULL);
 | 
									SetVariable(pset.vars, "HOST", NULL);
 | 
				
			||||||
				SetVariable(pset.vars, "PORT", NULL);
 | 
									SetVariable(pset.vars, "PORT", NULL);
 | 
				
			||||||
				SetVariable(pset.vars, "UNIXSOCKET", NULL);
 | 
					 | 
				
			||||||
				SetVariable(pset.vars, "USER", NULL);
 | 
									SetVariable(pset.vars, "USER", NULL);
 | 
				
			||||||
				SetVariable(pset.vars, "ENCODING", NULL);
 | 
									SetVariable(pset.vars, "ENCODING", NULL);
 | 
				
			||||||
				return false;
 | 
									return false;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@
 | 
				
			|||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright 2000 by PostgreSQL Global Development Group
 | 
					 * Copyright 2000 by PostgreSQL Global Development Group
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.33 2000/11/13 15:18:14 momjian Exp $
 | 
					 * $Header: /cvsroot/pgsql/src/bin/psql/help.c,v 1.34 2000/11/13 23:37:53 momjian Exp $
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include "postgres.h"
 | 
					#include "postgres.h"
 | 
				
			||||||
#include "help.h"
 | 
					#include "help.h"
 | 
				
			||||||
@@ -103,16 +103,6 @@ usage(void)
 | 
				
			|||||||
	puts(")");
 | 
						puts(")");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	puts("  -H              HTML table output mode (-P format=html)");
 | 
						puts("  -H              HTML table output mode (-P format=html)");
 | 
				
			||||||
 | 
					 | 
				
			||||||
	/* Display default Unix-domain socket */
 | 
					 | 
				
			||||||
	env = getenv("PGUNIXSOCKET");
 | 
					 | 
				
			||||||
	printf("  -k <path>       Specify Unix domain socket name (default: ");
 | 
					 | 
				
			||||||
	if (env)
 | 
					 | 
				
			||||||
		fputs(env, stdout);
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
		fputs("computed from the port", stdout);
 | 
					 | 
				
			||||||
	puts(")");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	puts("  -l              List available databases, then exit");
 | 
						puts("  -l              List available databases, then exit");
 | 
				
			||||||
	puts("  -n              Disable readline");
 | 
						puts("  -n              Disable readline");
 | 
				
			||||||
	puts("  -o <filename>   Send query output to filename (or |pipe)");
 | 
						puts("  -o <filename>   Send query output to filename (or |pipe)");
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@
 | 
				
			|||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright 2000 by PostgreSQL Global Development Group
 | 
					 * Copyright 2000 by PostgreSQL Global Development Group
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * $Header: /cvsroot/pgsql/src/bin/psql/prompt.c,v 1.14 2000/11/13 15:18:14 momjian Exp $
 | 
					 * $Header: /cvsroot/pgsql/src/bin/psql/prompt.c,v 1.15 2000/11/13 23:37:53 momjian Exp $
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include "postgres.h"
 | 
					#include "postgres.h"
 | 
				
			||||||
#include "prompt.h"
 | 
					#include "prompt.h"
 | 
				
			||||||
@@ -190,11 +190,6 @@ get_prompt(promptStatus_t status)
 | 
				
			|||||||
					if (pset.db && PQport(pset.db))
 | 
										if (pset.db && PQport(pset.db))
 | 
				
			||||||
						strncpy(buf, PQport(pset.db), MAX_PROMPT_SIZE);
 | 
											strncpy(buf, PQport(pset.db), MAX_PROMPT_SIZE);
 | 
				
			||||||
					break;
 | 
										break;
 | 
				
			||||||
					/* DB server Unix-domain socket */
 | 
					 | 
				
			||||||
				case '<':
 | 
					 | 
				
			||||||
					if (pset.db && PQunixsocket(pset.db))
 | 
					 | 
				
			||||||
						strncpy(buf, PQunixsocket(pset.db), MAX_PROMPT_SIZE);
 | 
					 | 
				
			||||||
					break;
 | 
					 | 
				
			||||||
					/* DB server user name */
 | 
										/* DB server user name */
 | 
				
			||||||
				case 'n':
 | 
									case 'n':
 | 
				
			||||||
					if (pset.db)
 | 
										if (pset.db)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@
 | 
				
			|||||||
 *
 | 
					 *
 | 
				
			||||||
 * Copyright 2000 by PostgreSQL Global Development Group
 | 
					 * Copyright 2000 by PostgreSQL Global Development Group
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.38 2000/11/13 15:18:14 momjian Exp $
 | 
					 * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.39 2000/11/13 23:37:53 momjian Exp $
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
#include "postgres.h"
 | 
					#include "postgres.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -65,7 +65,6 @@ struct adhoc_opts
 | 
				
			|||||||
	char	   *dbname;
 | 
						char	   *dbname;
 | 
				
			||||||
	char	   *host;
 | 
						char	   *host;
 | 
				
			||||||
	char	   *port;
 | 
						char	   *port;
 | 
				
			||||||
	char	   *unixsocket;
 | 
					 | 
				
			||||||
	char	   *username;
 | 
						char	   *username;
 | 
				
			||||||
	enum _actions action;
 | 
						enum _actions action;
 | 
				
			||||||
	char	   *action_string;
 | 
						char	   *action_string;
 | 
				
			||||||
@@ -162,7 +161,6 @@ main(int argc, char *argv[])
 | 
				
			|||||||
	do
 | 
						do
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		need_pass = false;
 | 
							need_pass = false;
 | 
				
			||||||
		/* FIXME use PQconnectdb to allow setting the unix socket */
 | 
					 | 
				
			||||||
		pset.db = PQsetdbLogin(options.host, options.port, NULL, NULL,
 | 
							pset.db = PQsetdbLogin(options.host, options.port, NULL, NULL,
 | 
				
			||||||
			options.action == ACT_LIST_DB ? "template1" : options.dbname,
 | 
								options.action == ACT_LIST_DB ? "template1" : options.dbname,
 | 
				
			||||||
							   username, password);
 | 
												   username, password);
 | 
				
			||||||
@@ -208,7 +206,6 @@ main(int argc, char *argv[])
 | 
				
			|||||||
	SetVariable(pset.vars, "USER", PQuser(pset.db));
 | 
						SetVariable(pset.vars, "USER", PQuser(pset.db));
 | 
				
			||||||
	SetVariable(pset.vars, "HOST", PQhost(pset.db));
 | 
						SetVariable(pset.vars, "HOST", PQhost(pset.db));
 | 
				
			||||||
	SetVariable(pset.vars, "PORT", PQport(pset.db));
 | 
						SetVariable(pset.vars, "PORT", PQport(pset.db));
 | 
				
			||||||
	SetVariable(pset.vars, "UNIXSOCKET", PQunixsocket(pset.db));
 | 
					 | 
				
			||||||
	SetVariable(pset.vars, "ENCODING", pg_encoding_to_char(pset.encoding));
 | 
						SetVariable(pset.vars, "ENCODING", pg_encoding_to_char(pset.encoding));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef WIN32
 | 
					#ifndef WIN32
 | 
				
			||||||
@@ -323,7 +320,6 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
 | 
				
			|||||||
		{"field-separator", required_argument, NULL, 'F'},
 | 
							{"field-separator", required_argument, NULL, 'F'},
 | 
				
			||||||
		{"host", required_argument, NULL, 'h'},
 | 
							{"host", required_argument, NULL, 'h'},
 | 
				
			||||||
		{"html", no_argument, NULL, 'H'},
 | 
							{"html", no_argument, NULL, 'H'},
 | 
				
			||||||
		{"unixsocket", required_argument, NULL, 'k'},
 | 
					 | 
				
			||||||
		{"list", no_argument, NULL, 'l'},
 | 
							{"list", no_argument, NULL, 'l'},
 | 
				
			||||||
		{"no-readline", no_argument, NULL, 'n'},
 | 
							{"no-readline", no_argument, NULL, 'n'},
 | 
				
			||||||
		{"output", required_argument, NULL, 'o'},
 | 
							{"output", required_argument, NULL, 'o'},
 | 
				
			||||||
@@ -357,14 +353,14 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
 | 
				
			|||||||
	memset(options, 0, sizeof *options);
 | 
						memset(options, 0, sizeof *options);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef HAVE_GETOPT_LONG
 | 
					#ifdef HAVE_GETOPT_LONG
 | 
				
			||||||
	while ((c = getopt_long(argc, argv, "aAc:d:eEf:F:lh:Hk:no:p:P:qRsStT:uU:v:VWxX?", long_options, &optindex)) != -1)
 | 
						while ((c = getopt_long(argc, argv, "aAc:d:eEf:F:lh:Hno:p:P:qRsStT:uU:v:VWxX?", long_options, &optindex)) != -1)
 | 
				
			||||||
#else							/* not HAVE_GETOPT_LONG */
 | 
					#else							/* not HAVE_GETOPT_LONG */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Be sure to leave the '-' in here, so we can catch accidental long
 | 
						 * Be sure to leave the '-' in here, so we can catch accidental long
 | 
				
			||||||
	 * options.
 | 
						 * options.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	while ((c = getopt(argc, argv, "aAc:d:eEf:F:lh:Hk:no:p:P:qRsStT:uU:v:VWxX?-")) != -1)
 | 
						while ((c = getopt(argc, argv, "aAc:d:eEf:F:lh:Hno:p:P:qRsStT:uU:v:VWxX?-")) != -1)
 | 
				
			||||||
#endif	 /* not HAVE_GETOPT_LONG */
 | 
					#endif	 /* not HAVE_GETOPT_LONG */
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		switch (c)
 | 
							switch (c)
 | 
				
			||||||
@@ -410,9 +406,6 @@ parse_psql_options(int argc, char *argv[], struct adhoc_opts * options)
 | 
				
			|||||||
			case 'l':
 | 
								case 'l':
 | 
				
			||||||
				options->action = ACT_LIST_DB;
 | 
									options->action = ACT_LIST_DB;
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
			case 'k':
 | 
					 | 
				
			||||||
				options->unixsocket = optarg;
 | 
					 | 
				
			||||||
				break;
 | 
					 | 
				
			||||||
			case 'n':
 | 
								case 'n':
 | 
				
			||||||
				options->no_readline = true;
 | 
									options->no_readline = true;
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -11,7 +11,7 @@
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# IDENTIFICATION
 | 
					# IDENTIFICATION
 | 
				
			||||||
#    $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.10 2000/11/13 15:18:14 momjian Exp $
 | 
					#    $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.11 2000/11/13 23:37:53 momjian Exp $
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
#-------------------------------------------------------------------------
 | 
					#-------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -50,15 +50,6 @@ do
 | 
				
			|||||||
        --port=*)
 | 
					        --port=*)
 | 
				
			||||||
                PSQLOPT="$PSQLOPT -p "`echo $1 | sed 's/^--port=//'`
 | 
					                PSQLOPT="$PSQLOPT -p "`echo $1 | sed 's/^--port=//'`
 | 
				
			||||||
                ;;
 | 
					                ;;
 | 
				
			||||||
	--unixsocket|-k)
 | 
					 | 
				
			||||||
		PSQLOPT="$PSQLOPT -k $2"
 | 
					 | 
				
			||||||
		shift;;
 | 
					 | 
				
			||||||
        -k*)
 | 
					 | 
				
			||||||
                PSQLOPT="$PSQLOPT $1"
 | 
					 | 
				
			||||||
                ;;
 | 
					 | 
				
			||||||
        --unixsocket=*)
 | 
					 | 
				
			||||||
                PSQLOPT="$PSQLOPT -k "`echo $1 | sed 's/^--unixsocket=//'`
 | 
					 | 
				
			||||||
                ;;
 | 
					 | 
				
			||||||
	--username|-U)
 | 
						--username|-U)
 | 
				
			||||||
		PSQLOPT="$PSQLOPT -U $2"
 | 
							PSQLOPT="$PSQLOPT -U $2"
 | 
				
			||||||
		shift;;
 | 
							shift;;
 | 
				
			||||||
@@ -123,7 +114,6 @@ if [ "$usage" ]; then
 | 
				
			|||||||
	echo "  -E, --encoding=ENCODING         Multibyte encoding for the database"
 | 
						echo "  -E, --encoding=ENCODING         Multibyte encoding for the database"
 | 
				
			||||||
	echo "  -h, --host=HOSTNAME             Database server host"
 | 
						echo "  -h, --host=HOSTNAME             Database server host"
 | 
				
			||||||
	echo "  -p, --port=PORT                 Database server port"
 | 
						echo "  -p, --port=PORT                 Database server port"
 | 
				
			||||||
	echo "  -k, --unixsocket=PATH           Database server Unix-domain socket name"
 | 
					 | 
				
			||||||
	echo "  -U, --username=USERNAME         Username to connect as"
 | 
						echo "  -U, --username=USERNAME         Username to connect as"
 | 
				
			||||||
	echo "  -W, --password                  Prompt for password"
 | 
						echo "  -W, --password                  Prompt for password"
 | 
				
			||||||
	echo "  -e, --echo                      Show the query being sent to the backend"
 | 
						echo "  -e, --echo                      Show the query being sent to the backend"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,7 +8,7 @@
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# IDENTIFICATION
 | 
					# IDENTIFICATION
 | 
				
			||||||
#    $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.18 2000/11/13 15:18:14 momjian Exp $
 | 
					#    $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.19 2000/11/13 23:37:53 momjian Exp $
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
#-------------------------------------------------------------------------
 | 
					#-------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -65,15 +65,6 @@ do
 | 
				
			|||||||
        --port=*)
 | 
					        --port=*)
 | 
				
			||||||
                PSQLOPT="$PSQLOPT -p "`echo $1 | sed 's/^--port=//'`
 | 
					                PSQLOPT="$PSQLOPT -p "`echo $1 | sed 's/^--port=//'`
 | 
				
			||||||
                ;;
 | 
					                ;;
 | 
				
			||||||
	--unixsocket|-k)
 | 
					 | 
				
			||||||
		PSQLOPT="$PSQLOPT -k $2"
 | 
					 | 
				
			||||||
		shift;;
 | 
					 | 
				
			||||||
        -k*)
 | 
					 | 
				
			||||||
                PSQLOPT="$PSQLOPT $1"
 | 
					 | 
				
			||||||
                ;;
 | 
					 | 
				
			||||||
        --unixsocket=*)
 | 
					 | 
				
			||||||
                PSQLOPT="$PSQLOPT -k "`echo $1 | sed 's/^--unixsocket=//'`
 | 
					 | 
				
			||||||
                ;;
 | 
					 | 
				
			||||||
	--username|-U)
 | 
						--username|-U)
 | 
				
			||||||
		PSQLOPT="$PSQLOPT -U $2"
 | 
							PSQLOPT="$PSQLOPT -U $2"
 | 
				
			||||||
		shift;;
 | 
							shift;;
 | 
				
			||||||
@@ -135,7 +126,6 @@ if [ "$usage" ]; then
 | 
				
			|||||||
	echo "Options:"
 | 
						echo "Options:"
 | 
				
			||||||
	echo "  -h, --host=HOSTNAME             Database server host"
 | 
						echo "  -h, --host=HOSTNAME             Database server host"
 | 
				
			||||||
	echo "  -p, --port=PORT                 Database server port"
 | 
						echo "  -p, --port=PORT                 Database server port"
 | 
				
			||||||
	echo "  -k, --unixsocket=PATH           Database server Unix-domain socket name"
 | 
					 | 
				
			||||||
	echo "  -U, --username=USERNAME         Username to connect as"
 | 
						echo "  -U, --username=USERNAME         Username to connect as"
 | 
				
			||||||
	echo "  -W, --password                  Prompt for password"
 | 
						echo "  -W, --password                  Prompt for password"
 | 
				
			||||||
	echo "  -d, --dbname=DBNAME             Database to install language in"
 | 
						echo "  -d, --dbname=DBNAME             Database to install language in"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,7 +8,7 @@
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# IDENTIFICATION
 | 
					# IDENTIFICATION
 | 
				
			||||||
#    $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createuser,v 1.13 2000/11/13 15:18:14 momjian Exp $
 | 
					#    $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createuser,v 1.14 2000/11/13 23:37:53 momjian Exp $
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# Note - this should NOT be setuid.
 | 
					# Note - this should NOT be setuid.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
@@ -63,15 +63,6 @@ do
 | 
				
			|||||||
        --port=*)
 | 
					        --port=*)
 | 
				
			||||||
                PSQLOPT="$PSQLOPT -p "`echo $1 | sed 's/^--port=//'`
 | 
					                PSQLOPT="$PSQLOPT -p "`echo $1 | sed 's/^--port=//'`
 | 
				
			||||||
                ;;
 | 
					                ;;
 | 
				
			||||||
	--unixsocket|-k)
 | 
					 | 
				
			||||||
		PSQLOPT="$PSQLOPT -k $2"
 | 
					 | 
				
			||||||
		shift;;
 | 
					 | 
				
			||||||
        -k*)
 | 
					 | 
				
			||||||
                PSQLOPT="$PSQLOPT $1"
 | 
					 | 
				
			||||||
                ;;
 | 
					 | 
				
			||||||
        --unixsocket=*)
 | 
					 | 
				
			||||||
                PSQLOPT="$PSQLOPT -k "`echo $1 | sed 's/^--unixsocket=//'`
 | 
					 | 
				
			||||||
                ;;
 | 
					 | 
				
			||||||
# Note: These two specify the user to connect as (like in psql),
 | 
					# Note: These two specify the user to connect as (like in psql),
 | 
				
			||||||
#       not the user you're creating.
 | 
					#       not the user you're creating.
 | 
				
			||||||
	--username|-U)
 | 
						--username|-U)
 | 
				
			||||||
@@ -144,7 +135,6 @@ if [ "$usage" ]; then
 | 
				
			|||||||
	echo "  -P, --pwprompt                  Assign a password to new user"
 | 
						echo "  -P, --pwprompt                  Assign a password to new user"
 | 
				
			||||||
	echo "  -h, --host=HOSTNAME             Database server host"
 | 
						echo "  -h, --host=HOSTNAME             Database server host"
 | 
				
			||||||
	echo "  -p, --port=PORT                 Database server port"
 | 
						echo "  -p, --port=PORT                 Database server port"
 | 
				
			||||||
	echo "  -k, --unixsocket=PATH           Database server Unix-domain socket name"
 | 
					 | 
				
			||||||
	echo "  -U, --username=USERNAME         Username to connect as (not the one to create)"
 | 
						echo "  -U, --username=USERNAME         Username to connect as (not the one to create)"
 | 
				
			||||||
	echo "  -W, --password                  Prompt for password to connect"
 | 
						echo "  -W, --password                  Prompt for password to connect"
 | 
				
			||||||
	echo "  -e, --echo                      Show the query being sent to the backend"
 | 
						echo "  -e, --echo                      Show the query being sent to the backend"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,7 +10,7 @@
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# IDENTIFICATION
 | 
					# IDENTIFICATION
 | 
				
			||||||
#    $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropdb,v 1.8 2000/11/13 15:18:14 momjian Exp $
 | 
					#    $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropdb,v 1.9 2000/11/13 23:37:53 momjian Exp $
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
#-------------------------------------------------------------------------
 | 
					#-------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -59,15 +59,6 @@ do
 | 
				
			|||||||
        --port=*)
 | 
					        --port=*)
 | 
				
			||||||
                PSQLOPT="$PSQLOPT -p "`echo $1 | sed 's/^--port=//'`
 | 
					                PSQLOPT="$PSQLOPT -p "`echo $1 | sed 's/^--port=//'`
 | 
				
			||||||
                ;;
 | 
					                ;;
 | 
				
			||||||
	--unixsocket|-k)
 | 
					 | 
				
			||||||
		PSQLOPT="$PSQLOPT -k $2"
 | 
					 | 
				
			||||||
		shift;;
 | 
					 | 
				
			||||||
        -k*)
 | 
					 | 
				
			||||||
                PSQLOPT="$PSQLOPT $1"
 | 
					 | 
				
			||||||
                ;;
 | 
					 | 
				
			||||||
        --unixsocket=*)
 | 
					 | 
				
			||||||
                PSQLOPT="$PSQLOPT -k "`echo $1 | sed 's/^--unixsocket=//'`
 | 
					 | 
				
			||||||
                ;;
 | 
					 | 
				
			||||||
	--username|-U)
 | 
						--username|-U)
 | 
				
			||||||
		PSQLOPT="$PSQLOPT -U $2"
 | 
							PSQLOPT="$PSQLOPT -U $2"
 | 
				
			||||||
		shift;;
 | 
							shift;;
 | 
				
			||||||
@@ -112,7 +103,6 @@ if [ "$usage" ]; then
 | 
				
			|||||||
	echo "Options:"
 | 
						echo "Options:"
 | 
				
			||||||
	echo "  -h, --host=HOSTNAME             Database server host"
 | 
						echo "  -h, --host=HOSTNAME             Database server host"
 | 
				
			||||||
	echo "  -p, --port=PORT                 Database server port"
 | 
						echo "  -p, --port=PORT                 Database server port"
 | 
				
			||||||
	echo "  -k, --unixsocket=PATH           Database server Unix-domain socket name"
 | 
					 | 
				
			||||||
	echo "  -U, --username=USERNAME         Username to connect as"
 | 
						echo "  -U, --username=USERNAME         Username to connect as"
 | 
				
			||||||
	echo "  -W, --password                  Prompt for password"
 | 
						echo "  -W, --password                  Prompt for password"
 | 
				
			||||||
	echo "  -i, --interactive               Prompt before deleting anything"
 | 
						echo "  -i, --interactive               Prompt before deleting anything"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,7 +8,7 @@
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# IDENTIFICATION
 | 
					# IDENTIFICATION
 | 
				
			||||||
#    $Header: /cvsroot/pgsql/src/bin/scripts/Attic/droplang,v 1.9 2000/11/13 15:18:14 momjian Exp $
 | 
					#    $Header: /cvsroot/pgsql/src/bin/scripts/Attic/droplang,v 1.10 2000/11/13 23:37:53 momjian Exp $
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
#-------------------------------------------------------------------------
 | 
					#-------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -65,15 +65,6 @@ do
 | 
				
			|||||||
        --port=*)
 | 
					        --port=*)
 | 
				
			||||||
                PSQLOPT="$PSQLOPT -p "`echo $1 | sed 's/^--port=//'`
 | 
					                PSQLOPT="$PSQLOPT -p "`echo $1 | sed 's/^--port=//'`
 | 
				
			||||||
                ;;
 | 
					                ;;
 | 
				
			||||||
	--unixsocket|-k)
 | 
					 | 
				
			||||||
		PSQLOPT="$PSQLOPT -k $2"
 | 
					 | 
				
			||||||
		shift;;
 | 
					 | 
				
			||||||
        -k*)
 | 
					 | 
				
			||||||
                PSQLOPT="$PSQLOPT $1"
 | 
					 | 
				
			||||||
                ;;
 | 
					 | 
				
			||||||
        --unixsocket=*)
 | 
					 | 
				
			||||||
                PSQLOPT="$PSQLOPT -k "`echo $1 | sed 's/^--unixsocket=//'`
 | 
					 | 
				
			||||||
                ;;
 | 
					 | 
				
			||||||
	--username|-U)
 | 
						--username|-U)
 | 
				
			||||||
		PSQLOPT="$PSQLOPT -U $2"
 | 
							PSQLOPT="$PSQLOPT -U $2"
 | 
				
			||||||
		shift;;
 | 
							shift;;
 | 
				
			||||||
@@ -122,7 +113,6 @@ if [ "$usage" ]; then
 | 
				
			|||||||
	echo "Options:"
 | 
						echo "Options:"
 | 
				
			||||||
	echo "  -h, --host=HOSTNAME             Database server host"
 | 
						echo "  -h, --host=HOSTNAME             Database server host"
 | 
				
			||||||
	echo "  -p, --port=PORT                 Database server port"
 | 
						echo "  -p, --port=PORT                 Database server port"
 | 
				
			||||||
	echo "  -k, --unixsocket=PATH           Database server Unix-domain socket name"
 | 
					 | 
				
			||||||
	echo "  -U, --username=USERNAME         Username to connect as"
 | 
						echo "  -U, --username=USERNAME         Username to connect as"
 | 
				
			||||||
	echo "  -W, --password                  Prompt for password"
 | 
						echo "  -W, --password                  Prompt for password"
 | 
				
			||||||
	echo "  -d, --dbname=DBNAME             Database to remove language from"
 | 
						echo "  -d, --dbname=DBNAME             Database to remove language from"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,7 +8,7 @@
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# IDENTIFICATION
 | 
					# IDENTIFICATION
 | 
				
			||||||
#    $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropuser,v 1.8 2000/11/13 15:18:14 momjian Exp $
 | 
					#    $Header: /cvsroot/pgsql/src/bin/scripts/Attic/dropuser,v 1.9 2000/11/13 23:37:53 momjian Exp $
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# Note - this should NOT be setuid.
 | 
					# Note - this should NOT be setuid.
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
@@ -59,15 +59,6 @@ do
 | 
				
			|||||||
        --port=*)
 | 
					        --port=*)
 | 
				
			||||||
                PSQLOPT="$PSQLOPT -p "`echo $1 | sed 's/^--port=//'`
 | 
					                PSQLOPT="$PSQLOPT -p "`echo $1 | sed 's/^--port=//'`
 | 
				
			||||||
                ;;
 | 
					                ;;
 | 
				
			||||||
	--unixsocket|-k)
 | 
					 | 
				
			||||||
		PSQLOPT="$PSQLOPT -k $2"
 | 
					 | 
				
			||||||
		shift;;
 | 
					 | 
				
			||||||
        -k*)
 | 
					 | 
				
			||||||
                PSQLOPT="$PSQLOPT $1"
 | 
					 | 
				
			||||||
                ;;
 | 
					 | 
				
			||||||
        --unixsocket=*)
 | 
					 | 
				
			||||||
                PSQLOPT="$PSQLOPT -k "`echo $1 | sed 's/^--unixsocket=//'`
 | 
					 | 
				
			||||||
                ;;
 | 
					 | 
				
			||||||
# Note: These two specify the user to connect as (like in psql),
 | 
					# Note: These two specify the user to connect as (like in psql),
 | 
				
			||||||
#       not the user you're dropping.
 | 
					#       not the user you're dropping.
 | 
				
			||||||
	--username|-U)
 | 
						--username|-U)
 | 
				
			||||||
@@ -114,7 +105,6 @@ if [ "$usage" ]; then
 | 
				
			|||||||
	echo "Options:"
 | 
						echo "Options:"
 | 
				
			||||||
	echo "  -h, --host=HOSTNAME             Database server host"
 | 
						echo "  -h, --host=HOSTNAME             Database server host"
 | 
				
			||||||
	echo "  -p, --port=PORT                 Database server port"
 | 
						echo "  -p, --port=PORT                 Database server port"
 | 
				
			||||||
	echo "  -k, --unixsocket=PATH           Database server Unix-domain socket name"
 | 
					 | 
				
			||||||
	echo "  -U, --username=USERNAME         Username to connect as (not the one to drop)"
 | 
						echo "  -U, --username=USERNAME         Username to connect as (not the one to drop)"
 | 
				
			||||||
	echo "  -W, --password                  Prompt for password to connect"
 | 
						echo "  -W, --password                  Prompt for password to connect"
 | 
				
			||||||
	echo "  -i, --interactive               Prompt before deleting anything"
 | 
						echo "  -i, --interactive               Prompt before deleting anything"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -11,7 +11,7 @@
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# IDENTIFICATION
 | 
					# IDENTIFICATION
 | 
				
			||||||
#    $Header: /cvsroot/pgsql/src/bin/scripts/Attic/vacuumdb,v 1.11 2000/11/13 15:18:14 momjian Exp $
 | 
					#    $Header: /cvsroot/pgsql/src/bin/scripts/Attic/vacuumdb,v 1.12 2000/11/13 23:37:53 momjian Exp $
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
#-------------------------------------------------------------------------
 | 
					#-------------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -52,15 +52,6 @@ do
 | 
				
			|||||||
        --port=*)
 | 
					        --port=*)
 | 
				
			||||||
                PSQLOPT="$PSQLOPT -p "`echo $1 | sed 's/^--port=//'`
 | 
					                PSQLOPT="$PSQLOPT -p "`echo $1 | sed 's/^--port=//'`
 | 
				
			||||||
                ;;
 | 
					                ;;
 | 
				
			||||||
	--unixsocket|-k)
 | 
					 | 
				
			||||||
		PSQLOPT="$PSQLOPT -k $2"
 | 
					 | 
				
			||||||
		shift;;
 | 
					 | 
				
			||||||
        -k*)
 | 
					 | 
				
			||||||
                PSQLOPT="$PSQLOPT $1"
 | 
					 | 
				
			||||||
                ;;
 | 
					 | 
				
			||||||
        --unixsocket=*)
 | 
					 | 
				
			||||||
                PSQLOPT="$PSQLOPT -k "`echo $1 | sed 's/^--unixsocket=//'`
 | 
					 | 
				
			||||||
                ;;
 | 
					 | 
				
			||||||
	--username|-U)
 | 
						--username|-U)
 | 
				
			||||||
		PSQLOPT="$PSQLOPT -U $2"
 | 
							PSQLOPT="$PSQLOPT -U $2"
 | 
				
			||||||
		shift;;
 | 
							shift;;
 | 
				
			||||||
@@ -130,7 +121,6 @@ if [ "$usage" ]; then
 | 
				
			|||||||
        echo "Options:"
 | 
					        echo "Options:"
 | 
				
			||||||
	echo "  -h, --host=HOSTNAME             Database server host"
 | 
						echo "  -h, --host=HOSTNAME             Database server host"
 | 
				
			||||||
	echo "  -p, --port=PORT                 Database server port"
 | 
						echo "  -p, --port=PORT                 Database server port"
 | 
				
			||||||
	echo "  -k, --unixsocket=PATH           Database server Unix-domain socket name"
 | 
					 | 
				
			||||||
	echo "  -U, --username=USERNAME         Username to connect as"
 | 
						echo "  -U, --username=USERNAME         Username to connect as"
 | 
				
			||||||
	echo "  -W, --password                  Prompt for password"
 | 
						echo "  -W, --password                  Prompt for password"
 | 
				
			||||||
	echo "  -d, --dbname=DBNAME             Database to vacuum"
 | 
						echo "  -d, --dbname=DBNAME             Database to vacuum"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,7 +8,7 @@
 | 
				
			|||||||
 *
 | 
					 *
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * IDENTIFICATION
 | 
					 * IDENTIFICATION
 | 
				
			||||||
 *	  $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.145 2000/11/13 15:18:15 momjian Exp $
 | 
					 *	  $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.146 2000/11/13 23:37:53 momjian Exp $
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *-------------------------------------------------------------------------
 | 
					 *-------------------------------------------------------------------------
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@@ -331,6 +331,25 @@ PQconnectStart(const char *conninfo)
 | 
				
			|||||||
	 */
 | 
						 */
 | 
				
			||||||
	PQconninfoFree(connOptions);
 | 
						PQconninfoFree(connOptions);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* ----------
 | 
				
			||||||
 | 
						 * Allow unix socket specification in the host name
 | 
				
			||||||
 | 
						 * ----------
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						if (conn->pghost && conn->pghost[0] == '/')
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							if (conn->pgunixsocket)
 | 
				
			||||||
 | 
								free(conn->pgunixsocket);
 | 
				
			||||||
 | 
							conn->pgunixsocket = conn->pghost;
 | 
				
			||||||
 | 
							conn->pghost = NULL;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if (conn->pghostaddr && conn->pghostaddr[0] == '/')
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							if (conn->pgunixsocket)
 | 
				
			||||||
 | 
								free(conn->pgunixsocket);
 | 
				
			||||||
 | 
							conn->pgunixsocket = conn->pghostaddr;
 | 
				
			||||||
 | 
							conn->pghostaddr = NULL;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* ----------
 | 
						/* ----------
 | 
				
			||||||
	 * Connect to the database
 | 
						 * Connect to the database
 | 
				
			||||||
	 * ----------
 | 
						 * ----------
 | 
				
			||||||
@@ -443,13 +462,25 @@ PQsetdbLogin(const char *pghost, const char *pgport, const char *pgoptions,
 | 
				
			|||||||
	else
 | 
						else
 | 
				
			||||||
		conn->pgport = strdup(pgport);
 | 
							conn->pgport = strdup(pgport);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if FIX_ME
 | 
						/* ----------
 | 
				
			||||||
	/* we need to modify the function to accept a unix socket path */
 | 
						 * We don't allow unix socket path as a function parameter.
 | 
				
			||||||
	if (pgunixsocket)
 | 
						 * This allows unix socket specification in the host name.
 | 
				
			||||||
		conn->pgunixsocket = strdup(pgunixsocket);
 | 
						 * ----------
 | 
				
			||||||
	else if ((tmp = getenv("PGUNIXSOCKET")) != NULL)
 | 
						 */
 | 
				
			||||||
		conn->pgunixsocket = strdup(tmp);
 | 
						if (conn->pghost && conn->pghost[0] == '/')
 | 
				
			||||||
#endif
 | 
						{
 | 
				
			||||||
 | 
							if (conn->pgunixsocket)
 | 
				
			||||||
 | 
								free(conn->pgunixsocket);
 | 
				
			||||||
 | 
							conn->pgunixsocket = conn->pghost;
 | 
				
			||||||
 | 
							conn->pghost = NULL;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if (conn->pghostaddr && conn->pghostaddr[0] == '/')
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							if (conn->pgunixsocket)
 | 
				
			||||||
 | 
								free(conn->pgunixsocket);
 | 
				
			||||||
 | 
							conn->pgunixsocket = conn->pghostaddr;
 | 
				
			||||||
 | 
							conn->pghostaddr = NULL;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (pgtty == NULL)
 | 
						if (pgtty == NULL)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,7 +12,7 @@
 | 
				
			|||||||
 * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
 | 
					 * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
 | 
				
			||||||
 * Portions Copyright (c) 1994, Regents of the University of California
 | 
					 * Portions Copyright (c) 1994, Regents of the University of California
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * $Id: libpq-int.h,v 1.28 2000/11/13 15:18:15 momjian Exp $
 | 
					 * $Id: libpq-int.h,v 1.29 2000/11/13 23:37:54 momjian Exp $
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *-------------------------------------------------------------------------
 | 
					 *-------------------------------------------------------------------------
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user