Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mBusP-0003iD-Nk for pgsql-general@arkaria.postgresql.org; Fri, 06 Aug 2021 08:06:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mBusO-0000LL-2O for pgsql-general@arkaria.postgresql.org; Fri, 06 Aug 2021 08:06:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mBusN-0000LD-MS for pgsql-general@lists.postgresql.org; Fri, 06 Aug 2021 08:06:43 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mBusL-000510-3D for pgsql-general@lists.postgresql.org; Fri, 06 Aug 2021 08:06:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=xxr+kZHw7LOoVtRSYTqTEvoubCKOKOipf0+EQgIF4aA=; b=EeNJ07BFZWoinrvJCKi8+/Ifui 2WYd0Pga4F0bmK7vU2Z/VbuSMx99OfUCLRYOC5u6FSSh/E9z4MgEXH8hx4dlDYr2flWHLOdlVess6 KQA0qAWr842jNS/1fJrLWmFN4gJlh/xyn6+1qpP70Ydu3foQa7SP0qlRoVgyz/8zCId8=; Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by depesz.com with esmtpa (Exim 4.92) (envelope-from ) id 1mBusJ-00059d-7J; Fri, 06 Aug 2021 10:06:39 +0200 Date: Fri, 6 Aug 2021 10:06:39 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: Matthias Apitz Cc: pgsql-general@lists.postgresql.org Subject: Re: psql's default database on connect (our internal ref. SRP-30861) Message-ID: <20210806080639.GA31227@depesz.com> Reply-To: depesz@depesz.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Aug 06, 2021 at 08:53:22AM +0200, Matthias Apitz wrote: > What do I uderstand wrong? Please check https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS Specifically: > dbname : The database name. Defaults to be the same as the user name. > In certain contexts, the value is checked for extended > formats; see Section 33.1.1 for more details on those. > user : PostgreSQL user name to connect as. Defaults to be the same > as the operating system name of the user running the > application. depesz