pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomasz Myrta <jasiek@klaster.net>
To: Hugh Esco <hesco@greens.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: Problems invoking psql.  Help please.
Date: Tue, 19 Nov 2002 09:25:09 +0100
Message-ID: <3DD9F565.6010002@klaster.net> (raw)
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>

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




view thread (31+ messages)  latest in thread

Message-ID: <3DD9F565.6010002@klaster.net>
Permalink:  ../3DD9F565.6010002@klaster.net/
Also on:    postgresql.org/message-id/3DD9F565.6010002@klaster.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jasiek@klaster.net, hesco@greens.org
  Subject: Re: Problems invoking psql.  Help please.
  In-Reply-To: <3DD9F565.6010002@klaster.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox