Re: Postgres Pain Points #3 postgres role - Mailing list pgsql-general

From David G. Johnston
Subject Re: Postgres Pain Points #3 postgres role
Date
Msg-id CAKFQuwaO2k3EPZ=y-hyKMoV0_cZ8Hyytuk8RaE3umr0M+uRLtw@mail.gmail.com
Whole thread Raw
In response to Re: Postgres Pain Points #3 postgres role  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
On Thu, Aug 11, 2016 at 1:22 PM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:

The only other thing I have seen is this:

https://help.ubuntu.com/community/PostgreSQL

and it shows:

sudo -u postgres psql postgres


​The second postgres redundant - the default database to connect to is the name of the connecting user.

The relates back to your pg_hba.conf concern.

The default pg_hba.conf allows for the postgres user on the system to connect, via the postgres user in the cluster, ​to the postgres database that is created by default, using a UNIX socket. Among other possibilities "sudo -u postgres" accomplishes the "for the postgres user on the system" portion of the above.  The rest of it is handled by defaults within the psql application.

At this point you can connect as a superuser and setup whatever else you require.  This is the way Ubuntu means for PostgreSQL to be configured initially - via the postgres O/S user on a local UNIX socket.

David J.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Postgres Pain Points #3 postgres role
Next
From: "David G. Johnston"
Date:
Subject: Re: Postgres Pain Points 2 ruby / node language drivers