Re: ~/.psqlrc file is ignored

From: Thom Brown <thom(at)linux(dot)com>
To: vstuart <mail(at)victoriasjourney(dot)com>
Cc: PGSQL Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: ~/.psqlrc file is ignored
Date: 2017-07-21 12:33:27
Message-ID: CAA-aLv4eF1SFuPmSi_KBh3nVvTSY3p1F=R0x=92RLEV8RCRy5g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 19 July 2017 at 20:12, vstuart <mail(at)victoriasjourney(dot)com> wrote:
> Hi David: I see what you are saying; sorry for the confusion. This is how
> postgres operates on my system:
>
> [victoria(at)victoria ~]$ echo $HOME
> /home/victoria
>
> [victoria(at)victoria ~]$ which postgres
> /usr/bin/postgres
>
> [victoria(at)victoria ~]$ postgres
> postgres does not know where to find the server configuration file.
> You must specify the --config-file or -D invocation option or set the
> PGDATA environment variable.
>
> [victoria(at)victoria ~]$ psql
> psql: FATAL: database "victoria" does not exist

By default, psql will attempt to connect to a database named after the
operating system user you are connected as. It will also use that as
the database user name. As you don't have a database of the same name
as your user account, you will need to specify it:

psql -d <databasename> -U <username>

Thom

In response to

Browse pgsql-general by date

  From Date Subject
Next Message marcelo 2017-07-21 12:58:00 Schemas and foreign keys
Previous Message basti 2017-07-21 12:31:36 pg_dump and insert json with copy