Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id BB770475EA4 for ; Tue, 19 Nov 2002 03:22:06 -0500 (EST) Received: from serwer.skawsoft.com.pl (unknown [213.25.37.66]) by postgresql.org (Postfix) with ESMTP id 0AC64475E88 for ; Tue, 19 Nov 2002 03:22:06 -0500 (EST) Received: from klaster.net (pk17.krakow.cvx.ppp.tpnet.pl [217.99.211.17]) by serwer.skawsoft.com.pl (Postfix) with ESMTP id DE1AE2BD7B; Tue, 19 Nov 2002 09:09:33 +0100 (CET) Message-ID: <3DD9F565.6010002@klaster.net> Date: Tue, 19 Nov 2002 09:25:09 +0100 From: Tomasz Myrta User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; PL; rv:1.1) Gecko/20020826 X-Accept-Language: pl, en-us, en MIME-Version: 1.0 To: Hugh Esco Cc: pgsql-sql@postgresql.org Subject: Re: Problems invoking psql. Help please. References: <5.1.0.14.0.20021116140623.031cbec0@petra.cagreens.org> <5.1.0.14.0.20021116140623.031cbec0@petra.cagreens.org> <5.1.0.14.0.20021118232418.03868810@petra.cagreens.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/261 X-Sequence-Number: 10403 Uz.ytkownik Hugh Esco napisa?: > Thank you so much, Mallah, Tomasz Myrta, Luis Sousa, > Achilleus Mantzios, Tom Lane, Bill Eaton and Oliver Elphick. > > I have chmod 755 my readpgenv file, and then copied the > shell script suggested by Tomasz Myrta into that file, > yielding these results: > >> biko:/usr/lib/postgresql/bin# cd /usr/bin >> biko:/usr/bin# ./psql -U postgres >> No database specified It's like it should be. >> biko:/usr/bin# ./psql -U postgres template1 >> /usr/lib/postgresql/bin/readpgenv: ./etc/postgresql/postgresql.env: No >> such file >> or directory > > > How should that file read? > >> Could not execv /usr/lib/postgresql/bin/psql If you still want to fight with your postgres, here is content of my (it's default) postgresql.env: >>BEGIN<< [ -r /etc/postgresql/postmaster.conf ] && . /etc/postgresql/postmaster.conf PGDATA=${POSTGRES_DATA:-/var/lib/postgres/data} PGLIB=/usr/lib/postgresql/lib PGACCESS_HOME=/usr/lib/postgresql/share/pgaccess PGHOST= export PGLIB PGDATA PGACCESS_HOME PGHOST >>END<< I think you should just reinstall postgres from .deb package as said Tom Lane. I had never troubles like yours with default .deb package. > Then I changed user from root to postgres, > under which this database had been created: Psql works also as root, but you should run it as postgres for security reason. Tomasz Myrta