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 1ltwxZ-0006LK-Qs for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Jun 2021 18:41:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ltwxY-0003Dm-Pd for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Jun 2021 18:41:48 +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 1ltwxY-0003Dd-IB for pgsql-hackers@lists.postgresql.org; Thu, 17 Jun 2021 18:41:48 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ltwxW-0006SE-Lz for pgsql-hackers@lists.postgresql.org; Thu, 17 Jun 2021 18:41:48 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 15HIfefr1036620; Thu, 17 Jun 2021 14:41:40 -0400 From: Tom Lane To: Andres Freund cc: Robert Haas , Boris Kolpackov , PostgreSQL Hackers , =?utf-8?Q?=C3=81lvaro?= Herrera Subject: Re: Add version macro to libpq-fe.h In-reply-to: <20210617183411.2taf6r32kftvfnb3@alap3.anarazel.de> References: <968815.1623936849@sss.pgh.pa.us> <1026744.1623950177@sss.pgh.pa.us> <20210617183411.2taf6r32kftvfnb3@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Thu, 17 Jun 2021 11:34:11 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1036618.1623955300.1@sss.pgh.pa.us> Date: Thu, 17 Jun 2021 14:41:40 -0400 Message-ID: <1036619.1623955300@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > I'm not sure I understand why you think that exposing the version number > for libpq is such a bad idea? > I think it'd be reasonable to add a few more carefully chosen macros to > pg_config_ext.h. The primary problem I've got with that is the risk of confusion between server and libpq version numbers. In particular, if we do it like that then we've just totally screwed the Debian packagers. They will have to choose whether to install pg_config_ext.h from their server build or their libpq build. Both choices are wrong, depending on what applications want to know. Now we could alternatively invent a libpq_version.h and hope that packagers remember to install the right version of that. But I think it's a better user experience all around to do it the other way. regards, tom lane