Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rXSjl-00AnSL-5A for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Feb 2024 21:12:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rXSjj-006kgN-8E for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Feb 2024 21:12:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rXSji-006kgF-VI for pgsql-hackers@lists.postgresql.org; Tue, 06 Feb 2024 21:12:10 +0000 Received: from mail-il1-x130.google.com ([2607:f8b0:4864:20::130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rXSjg-005QO1-Du for pgsql-hackers@postgresql.org; Tue, 06 Feb 2024 21:12:09 +0000 Received: by mail-il1-x130.google.com with SMTP id e9e14a558f8ab-363d953a6c5so1278365ab.1 for ; Tue, 06 Feb 2024 13:12:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707253927; x=1707858727; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=7Om9mfLtDqFRc3vfKEhNPpddp57TjqymDLhwWLQN4MM=; b=YSh01dBuPp01rvBFPvwzIMerdV1wEHHyTaS3MdoOnYS5OY2vANH2nUcJsQpRinoIJh 2BFIizn+wt7T2uFHpzNfsmyM9Wzk0twJDdRJ7ghTVouIe3VGsVGQE1Jf0PJhyxzeiZiJ zmQzo4LUoP+NDZpkzPnrlXv/t8jYJwUabBTvridqlvGOUj03mOOrInzmQ1OrP5qBwgRQ +K6QPNx1M2UlWjzoatHBQHMhUaVrqlplesLOE9uKDEVw4ZtlXC4R3gIgBEKeixoK3dcX DkHO6Qz2iS3nk+DscjcvFvbhDIPYfbtJwODexfot/02QpaHCxxkxyXVxlRYi3MUT5Y70 V0TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707253927; x=1707858727; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=7Om9mfLtDqFRc3vfKEhNPpddp57TjqymDLhwWLQN4MM=; b=KyyoJM/I4v2unBQ2ODiCQQfXaG7uSBe24DWPCy38OjtJYJxWI79k7mhBRKEBFbYCP3 r26AJQe1ywOvCQ7Rfnq/7fhqZTFUEcL3erPjglw9M7rkB82pu5mZsT7z71SbeREqb9po DJoCgh+95OZhk4GXDJ8T1HnfDCFLDEEsCRjeXrsvv9WjkzN+1IjmlyqBuXivrYiqGzmB 0B3afKWcROLKipJyng5Qas/3WjgUUMsmztkH65nsngu2flq3QIDyp0PxzZFIeK3Nq0fi +Vz1D88G71ZrhJCls0M6r1KqWDYqWH0L1HqdFUgElFqh3H39XN8/a5VpCW/oL9hlqKr4 FdoA== X-Gm-Message-State: AOJu0Yy+j8KIKkh8MiqRGzVPzHLAV69DkWN+MHuzQ6rJjgmnqUhrBKJm 1Y1qA3zZoS2XodDIoOKzG28wtQJQ6n0XtZfy5zeMLiowhVvRWIci X-Google-Smtp-Source: AGHT+IFEz0GqjtK013iitR9SWKR4qXe8+ey33YrLKl0M4Zx481hHC+GXc4B1A+OcS76bjk8enWcpbA== X-Received: by 2002:a05:6e02:1cac:b0:363:bcf2:e88f with SMTP id x12-20020a056e021cac00b00363bcf2e88fmr5228429ill.27.1707253927713; Tue, 06 Feb 2024 13:12:07 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCV09HbUvDCMn9sn6vNlrRHUbCBldH38tmWT5eGeKtfNwjYI+DLY98EFYqt0vEjTkp7zSDqW9W+R5j8MLZbrJZ3SQIgidM/YtWd4BqDv Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id x18-20020a92d652000000b00363cbe42a18sm748756ilp.74.2024.02.06.13.12.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 13:12:07 -0800 (PST) Date: Tue, 6 Feb 2024 15:12:05 -0600 From: Nathan Bossart To: Maiquel Grassi Cc: Erik Wienhold , "pgsql-hackers@postgresql.org" Subject: Re: Psql meta-command conninfo+ Message-ID: <20240206211205.GA3903996@nathanxps13> References: <20240206181919.GA3853632@nathanxps13> <20240206210605.GA3903769@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240206210605.GA3903769@nathanxps13> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Feb 06, 2024 at 03:06:05PM -0600, Nathan Bossart wrote: > On Tue, Feb 06, 2024 at 08:52:09PM +0000, Maiquel Grassi wrote: >> I made the adjustment in the code and updated the patch. I believe this >> is the format suggested by you all. Would this be it? > > I was thinking something more like > > SELECT pg_catalog.current_database() AS "Database", > current_user AS "User", > pg_catalog.current_setting('server_version') AS "Server Version", > pg_catalog.inet_server_addr() AS "Server Address", > pg_catalog.current_setting('port') AS "Port", > pg_catalog.inet_client_addr() AS "Client Address", > pg_catalog.inet_client_port() AS "Client Port", > pg_catalog.pg_backend_pid() AS "Session PID"; ... although that seems to be missing items like the socket directory and the host. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com