Re: [GENERAL] ~/.psqlrc file is ignored - Mailing list pgsql-general

From Thom Brown
Subject Re: [GENERAL] ~/.psqlrc file is ignored
Date
Msg-id CAA-aLv4eF1SFuPmSi_KBh3nVvTSY3p1F=R0x=92RLEV8RCRy5g@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] ~/.psqlrc file is ignored  (vstuart <mail@VictoriasJourney.com>)
List pgsql-general
On 19 July 2017 at 20:12, vstuart <mail@victoriasjourney.com> wrote:
> Hi David: I see what you are saying; sorry for the confusion. This is how
> postgres operates on my system:
>
> [victoria@victoria ~]$ echo $HOME
>   /home/victoria
>
> [victoria@victoria ~]$ which postgres
>   /usr/bin/postgres
>
> [victoria@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@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


pgsql-general by date:

Previous
From: basti
Date:
Subject: [GENERAL] pg_dump and insert json with copy
Next
From: marcelo
Date:
Subject: [GENERAL] Schemas and foreign keys