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 1uYRzb-006RBk-Gu for pgsql-hackers@arkaria.postgresql.org; Sun, 06 Jul 2025 16:13:27 +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 1uYRzZ-00EFFx-Jy for pgsql-hackers@arkaria.postgresql.org; Sun, 06 Jul 2025 16:13:26 +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 1uYRzZ-00EFFp-3E for pgsql-hackers@lists.postgresql.org; Sun, 06 Jul 2025 16:13:25 +0000 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uYRzY-005tPk-00 for pgsql-hackers@lists.postgresql.org; Sun, 06 Jul 2025 16:13:24 +0000 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-7399a2dc13fso2887809b3a.2 for ; Sun, 06 Jul 2025 09:13:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1751818402; x=1752423202; darn=lists.postgresql.org; h=user-agent: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=qFCiJ0rHReW7JZJOXO4xkaySDDBMIpVD++MsbjUxu4Y=; b=MFxS3wkrsiTuvf8CGtyh1NAvl/CPsGKtzInWIseBrIHHWAPT2+ORSynk12bzn9uQCC 20rszIwbWGi4oWWdT1MV7jl6ptm+8pTvIREO4Dn40DCClnpQHP1cYcFNQKmETXsI/qiZ 4j2HUFPDDOps6tiqaP0rXTVKode23ai0uF1vE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751818402; x=1752423202; h=user-agent: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=qFCiJ0rHReW7JZJOXO4xkaySDDBMIpVD++MsbjUxu4Y=; b=aKk0LWrIMmOrdvNaAnAsALMAKeDx+BoqauY2qy6dYCQE3jnd4RbmR5btbjznfF25rC M9XEwo7sO1u9yjLlftnEWAAWKDdABRx/z5GiENgJxNX4UKLvsQmz6/60i5bI8zxJx8tC kywUD/QMuWxma18GzDu0DtDRxJqg9nABEW5w2E1gtnkR+9Z1u+Z4/7svASk/IKbbR4fJ i/2qhZ9/NE0H+2nAVIUmxpvssCHUUSKTKqofknYDxYI5Xvg77+rVnaNQA6w5vBJJl7qU 90s7JFuZmK1dXHZOjSQYz2cNhFuJ3AS49EFLIfFCbF301YLXkNy40i/ckmqYm4bHFg+2 AwZA== X-Forwarded-Encrypted: i=1; AJvYcCUbAc1eYEQicfTJ2pztJTdur5aU8SjAF3n//7yBCSSFqgfjN7FzHNw21bYh+Com4Z92AdxR7oZ0mP2dJDpC@lists.postgresql.org X-Gm-Message-State: AOJu0YwN5cn4kCJV5whyBPZdCy0CSm6oEyccUwOeMLknHU7YdWmS2NMe c+JIFcAmR8MhadKmtRruIP56ncexkbNqxBflldekgRHerV55T1xXsWnyMSaVkIT+9g== X-Gm-Gg: ASbGncs/x7vALBEQ9++icN59lkfX5cvfcFM5x+qaJgK1LzP3m/Du1L9Wu+SIx6c15EE CLnQ9/tC4liqVMXBKMIlSaDhILiQPUWz2/uZtEr4nuXdMceyuC0OP6fdA+DLgS3Wg6e70Onl90S mXLPgQsFp+xIxximdhEJODAFyifnqVo3kWyDE8+BxRs1LxdjhpGrur8tG77AwHESw6wR0E7TB6n oYZoQerTATHfDizXBa9P8TmUV4dpvckaP8NmJ8GF0P3oCQIMHiN+ugQf5NxK2rsG+923XqyKTgK Psuh2RBIkkcX0IuJyJra0mCE+d2eS79SCKfjcXGQjL0AGEXkIPqYJsyIgN/KKVASeEO3OskEMSg KJvegTltccBL+SrY= X-Google-Smtp-Source: AGHT+IF47eWj9brcklA9DRSCl5pMzc6nFJTW6kJX2uRr7He4XvnghRp8dI9OEu6HcdUInAC6J9t8Yw== X-Received: by 2002:a05:6a21:7116:b0:21f:5324:340 with SMTP id adf61e73a8af0-225bac0b877mr17041040637.41.1751818402162; Sun, 06 Jul 2025 09:13:22 -0700 (PDT) Received: from google.com (c-76-132-193-99.hsd1.ca.comcast.net. [76.132.193.99]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b38ee478b46sm6058504a12.22.2025.07.06.09.13.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Jul 2025 09:13:21 -0700 (PDT) Date: Sun, 6 Jul 2025 09:13:19 -0700 From: Noah Misch To: Michael Paquier Cc: Michael Banck , Greg Sabino Mullane , PostgreSQL Hackers Subject: Re: [PATCH] Add support for displaying database service in psql prompt Message-ID: <20250706161319.c1.nmisch@google.com> References: <6723c612.050a0220.1567f4.b94a@mx.google.com> <6748cfd4.050a0220.1537dc.43bb@mx.google.com> <6760a25e.a70a0220.2e9d8f.d542@mx.google.com> <6761397c.df0a0220.68885.210d@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.2.12 (2023-09-09) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Dec 18, 2024 at 03:17:36PM +0900, Michael Paquier wrote: > Done. This new PQservice() function from commit 4b99fed75 came up in the annual exports.txt diff. The standard in libpq has been to not clutter the API with new functions that simply retrieve one PQconninfoOption value. PQconninfo() provides access to all those values in a generic way. What do you think of making psql use PQconninfo() for this, then removing PQservice()? The rest of the commit (adding the struct field, necessary for PQconninfo() to include the value) looks good.