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 1ltxzD-0008Dr-AF for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Jun 2021 19:47:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ltxzB-00046W-TN for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Jun 2021 19:47:33 +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 1ltxzB-00046N-Eh for pgsql-hackers@lists.postgresql.org; Thu, 17 Jun 2021 19:47:33 +0000 Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ltxz4-0006we-FG for pgsql-hackers@lists.postgresql.org; Thu, 17 Jun 2021 19:47:32 +0000 Received: by mail-io1-xd2e.google.com with SMTP id w4so3063105ior.1 for ; Thu, 17 Jun 2021 12:47:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=zs4p0yYvlfMBar4N9mrSJiKPmBrQmZuoB8aNCrgPs/o=; b=PYvoZFHEH0IGxmG3uJjG7NlitkHIBu6/0lwcKx9CvLtkmNUea+cFK+2r+bHYtIxE0C xCIjjUJzyeivyy4FnAJmBbTtH8OOkfb0wXpVSsUCh+hJwywDFRQ2gq5kD9Rj5FLYffv3 pGAJbWv/TJvt3dHEOBfP0m3HP5nzEt2QhEgr3eTqUSb6d/ffZKbAtq+LkWN7/3zs3DIY ngmUNSHYqsrLWUbgf4qVbXylLIIPHs/2b0BouRlqJJ4naOLV1HWcW+Bw1uX2NZILcvCc 9OmFDtABak54yT+ciYcBaDLiQGfvmU52snaWHT7XA831kt9ZhM71r2dHTtvw3lS0oY2f oEcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=zs4p0yYvlfMBar4N9mrSJiKPmBrQmZuoB8aNCrgPs/o=; b=fbgpUI/SlQcS8oEKHlMcO55sh7gPKdn+C1BcurOlz1oMCwCAwie2cfNF3pmuJZlWa5 LV7TPJlT7vZKnAz+k3AT/nCFMga6vVicBFLoCI6FBq4LeSZqQWPpHRUc44wHq82D3NQ2 0ruaYsGMmq5b8Lb6okm9TbOlmoCdxBl8IWDnJe0gpl0QUKkusB/CAoC9zHjH0XJKVGtx Lam6etnc9O7+mvwJpVh80C18UOQlwMcKuhLap452qeZr/YTzf65O7p30G7f7NWA4ttFB aGXmB1MYAs3iAUfllgkhA4wtw5pLk2JTp+c+2lmUHCMaJs/5x7x1b65/9sLDKWSjb2YR g1Qw== X-Gm-Message-State: AOAM531BB4HqjZBlX+WLfyISqlMf7OlTURs2YEZ5fr+8sv7crExklvsO hWRMyFq81J8OBDfdKBhY7TgZrg== X-Google-Smtp-Source: ABdhPJxxnERlJA80LYaC9/9Ly0+fe0EsFv/GZ0L//miLyPH3OQoEF7TLCGJ4Xy5Cdn/KJ+qlTai4UQ== X-Received: by 2002:a02:8521:: with SMTP id g30mr6201755jai.113.1623959244543; Thu, 17 Jun 2021 12:47:24 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id j17sm3177826ilc.39.2021.06.17.12.47.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jun 2021 12:47:24 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 1CFE6800837; Thu, 17 Jun 2021 14:47:23 -0500 (CDT) Date: Thu, 17 Jun 2021 14:47:22 -0500 From: Justin Pryzby To: Dagfinn Ilmari =?iso-8859-1?Q?Manns=E5ker?= Cc: Tom Lane , Robert Haas , Boris Kolpackov , pgsql-hackers@lists.postgresql.org, =?iso-8859-1?Q?=C1lvaro?= Herrera Subject: Re: Add version macro to libpq-fe.h Message-ID: <20210617194722.GI31772@telsasoft.com> References: <968815.1623936849@sss.pgh.pa.us> <1026744.1623950177@sss.pgh.pa.us> <1036264.1623954858@sss.pgh.pa.us> <87v96ci9pd.fsf@wibble.ilmari.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87v96ci9pd.fsf@wibble.ilmari.org> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Jun 17, 2021 at 08:15:42PM +0100, Dagfinn Ilmari Mannsåker wrote: > 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 pygresql is also using pg_config --version: setup.py- wanted = self.escaping_funcs setup.py: supported = pg_version >= (9, 0) -- setup.py- wanted = self.pqlib_info setup.py: supported = pg_version >= (9, 1) -- setup.py- wanted = self.ssl_info setup.py: supported = pg_version >= (9, 5) -- setup.py- wanted = self.memory_size setup.py: supported = pg_version >= (12, 0) -- Justin