Thread: incorrect error message
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/17/sql-alterrole.html Description: After changing to user postgres, I tried to launch psql shell as a new user ( -U). However the error message I received after I used an incorrect password was incorrect. It was saying that I had tried to wrong database. Is this correct? OS information: postgres@ubu241:~$ uname -a Linux ubu241 6.8.0-52-generic #53-Ubuntu SMP PREEMPT_DYNAMIC Sat Jan 11 00:06:25 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux postgres@ubu241:~$ cat /etc/*release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=24.04 DISTRIB_CODENAME=noble DISTRIB_DESCRIPTION="Ubuntu 24.04.1 LTS" PRETTY_NAME="Ubuntu 24.04.1 LTS" NAME="Ubuntu" VERSION_ID="24.04" VERSION="24.04.1 LTS (Noble Numbat)" VERSION_CODENAME=noble ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=noble LOGO=ubuntu-logo The issue being reported: uchenna@ubu241:~$ sudo -i -u postgres [sudo] password for uchenna: postgres@ubu241:~$ psql -U tester Password for user tester: psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: database "tester" does not exist postgres@ubu241:~$ psql psql (16.6 (Ubuntu 16.6-0ubuntu0.24.04.1)) Type "help" for help.
On Wednesday, February 12, 2025, PG Doc comments form <noreply@postgresql.org> wrote:
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/17/sql-alterrole.html
Description:
After changing to user postgres, I tried to launch psql shell as a new user
( -U). However the error message I received after I used an incorrect
password was incorrect. It was saying that I had tried to wrong database. Is
this correct?
Yes, this is working as documented. If you don’t like which database name is inferred specify one yourself.
David J.