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 1ltxUX-0007KE-K4 for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Jun 2021 19:15:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ltxUW-0001Dn-I1 for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Jun 2021 19:15:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ltxUV-0001Df-QZ for pgsql-hackers@lists.postgresql.org; Thu, 17 Jun 2021 19:15:52 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ltxUR-00065j-0B for pgsql-hackers@lists.postgresql.org; Thu, 17 Jun 2021 19:15:50 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id E48A95C00D0; Thu, 17 Jun 2021 15:15:44 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 17 Jun 2021 15:15:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ilmari.org; h= from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; s=fm2; bh=G+xbJ0bxRvbqXpbSYq/Slj9Q+j fGZAWpgXJIhg0I9kA=; b=n8jSiUhIOW11qiYrAP9F8g3RZKtOPm0X85BX+H1bsk TQM5iWdbSC891CUB13MI4H/j4sU9vuGiajQW0pZb+sVMqtAPN3ntc6o7EcIpfUp1 CuF2iRBQJYexzLKSa6u+CtXiuBarU8yo97DwUG2YI6PHd6l+Gp/jB680f3V6yUfa kfNPLSerhtzT9qnXlH9gkoNjmwWU8TQ1zBJk9WNZWs1J7mqmfQOYxSwSxEMTYfiT JHoFjxEi6kAXn235/DWUkfbEg+Yz9MPxQUO1anc64ckyFKOfz0Erb0IB+TZKTn6x 0SyoJxXNqvYHdEaBMuXgBJ3ZFBmVgfZccQWoQSrk4SJw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=G+xbJ0 bxRvbqXpbSYq/Slj9Q+jfGZAWpgXJIhg0I9kA=; b=pjIQPIO4G8VcimzFxcfFmM 989tjf0VXFA3LlaFKSOfE+A2j+QwNxTAQWzzb2M64D7EtQfQdp9KWeWNprTlTpws bzb2j3WWwp2O701lIMTtVCb36U+j/+bCVF/nDbHVKQU/FZVw4MIPOFbA55VF/qy4 VhPKZSJwjwWmrZThMzJ+MulSP+VKPyQ6S+6bYA87j5JeIGJoBNERsBJ2OkewR0Om mTa2/ImEEZljtx+A0WV/eACobRWJoHcWcCWgPDWiha2BU166FqtuDJRn2BpChwO/ Nb0p6whwnx9vQb2g5/xiQGMRY3GkcBHZQ0trVilf5Hcs6mNIvedyTwKbWe7x1NrQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeefuddgudeffecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufhffjgfkfgggtgesthdtredttderjeenucfhrhhomhepihhlmhgr rhhisehilhhmrghrihdrohhrghculdffrghgfhhinhhnucfklhhmrghrihcuofgrnhhnsh onkhgvrhdmnecuggftrfgrthhtvghrnhepheekiefhjeehieduteeivdehveetgfdviedt udekvdffjeeihfeigfetkefhtdegnecuffhomhgrihhnpehmvghtrggtphgrnhdrohhrgh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehilhhm rghrihesihhlmhgrrhhirdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 17 Jun 2021 15:15:43 -0400 (EDT) From: ilmari@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) To: Tom Lane Cc: Robert Haas , Boris Kolpackov , PostgreSQL Hackers , =?utf-8?Q?=C3=81lvaro?= Herrera Subject: Re: Add version macro to libpq-fe.h References: <968815.1623936849@sss.pgh.pa.us> <1026744.1623950177@sss.pgh.pa.us> <1036264.1623954858@sss.pgh.pa.us> Date: Thu, 17 Jun 2021 20:15:42 +0100 In-Reply-To: <1036264.1623954858@sss.pgh.pa.us> (Tom Lane's message of "Thu, 17 Jun 2021 14:34:18 -0400") Message-ID: <87v96ci9pd.fsf@wibble.ilmari.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Tom Lane writes: > Robert Haas writes: >> I just went and looked at how exports.txt has evolved over the years. >> Since PostgreSQL 8.1, every release except for 9.4 and 11 added at >> least one new function to libpq. That means in 14 releases we've done >> something that might break someone's compile 12 times. Now maybe you >> want to try to argue that few of those changes are "major," but I >> don't know how that could be a principled argument. Every new function >> is something someone may want to use, and thus a potential compile >> break. > > Interesting, but then you have to explain why this is the first time > that somebody has asked for a version number in libpq-fe.h. Maybe > all those previous additions were indeed minor enough that the > problem didn't come up. (Another likely possibility, perhaps, is > that people have been misusing the server version for this purpose, > and have been lucky enough to not have that approach fail for them.) FWIW, the perl DBD::Pg module extracts the version number from `pg_config --version` at build time, and uses that to define a PGLIBVERSION which is used to define fatal fallbacks for a few functions: https://metacpan.org/release/TURNSTEP/DBD-Pg-3.15.0/source/dbdimp.c#L26-55 I have an unfinished branch which does similar for PQsetSingleRowMode, (added in 9.2). - ilmari