Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 0C896635553 for ; Fri, 26 Jun 2009 13:15:05 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 27177-04 for ; Fri, 26 Jun 2009 13:15:03 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd-2317.dedibox.fr (sd-2317.dedibox.fr [88.191.17.192]) by mail.postgresql.org (Postfix) with ESMTP id 9E0D063408A for ; Fri, 26 Jun 2009 13:15:03 -0300 (ADT) Received: from laptop.localnet (ASte-Genev-Bois-153-1-75-235.w86-203.abo.wanadoo.fr [86.203.161.235]) by sd-2317.dedibox.fr (Postfix) with ESMTPA id 8BF972105; Fri, 26 Jun 2009 18:15:00 +0200 (CEST) From: Guillaume Lelarge To: pgsql-sql@postgresql.org, marchesini@unipg.it Subject: Re: .psql_history": No such file Date: Fri, 26 Jun 2009 18:14:58 +0200 User-Agent: KMail/1.11.90 (Linux/2.6.28-13-generic; KDE/4.2.90; i686; ; ) References: <1246031595.4836.27.camel@ivangeo> In-Reply-To: <1246031595.4836.27.camel@ivangeo> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200906261814.59148.guillaume@lelarge.info> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200906/109 X-Sequence-Number: 32714 Hi Ivan, Le vendredi 26 juin 2009 =E0 17:53:15, ivan marchesini a =E9crit : > [...] > I have installed a postgres db using a datadir different > from /var/lib/pgsql/.psql_history. > > then: > su postgres > psql postgres > > All went fine but when I exit from psql from a db I obtain: > _______ > could not save history to file "/var/lib/pgsql/.psql_history": No such > file or directory > _______ > > how can I fix this problem? where can I say psql that it must > write .psql_history into the datadir? > psql tries to write there because the home directory of the postgres user i= s=20 /var/lib/postgres. Probably better to use HISTFILE to change it (\set HISTF= ILE=20 '/path/to/histfile'). Regards. =2D-=20 Guillaume. http://www.postgresqlfr.org http://dalibo.com