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 1tvK1P-003U3F-J1 for pgsql-general@arkaria.postgresql.org; Thu, 20 Mar 2025 17:49:35 +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 1tvK0Q-005se5-8k for pgsql-general@arkaria.postgresql.org; Thu, 20 Mar 2025 17:48:34 +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 1tvK0P-005scz-G4 for pgsql-general@lists.postgresql.org; Thu, 20 Mar 2025 17:48:33 +0000 Received: from fhigh-b1-smtp.messagingengine.com ([202.12.124.152]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tvK0N-000AZv-2Y for pgsql-general@postgresql.org; Thu, 20 Mar 2025 17:48:32 +0000 Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfhigh.stl.internal (Postfix) with ESMTP id F17A32540100; Thu, 20 Mar 2025 13:48:29 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-09.internal (MEProxy); Thu, 20 Mar 2025 13:48:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1742492909; x=1742579309; bh=u gRyGrOECiTFqoHmM62Hqi0dTvjDHHXvao0uh3sD94A=; b=tdnKoDcMyLFj8cOQg MiDM5Oo+C52mRKAbWRU+oeKM1xTM8syaS6ihF9CqDOx6uQtMj6HmTR6DgwBOhlFJ uq3oV4g7rdZW4z29hIAG3fdN+eJJ8ghKRBL/xkNI81c+ko49mzQiGycwoIuH+NnQ E7wkAxp8y4/bJiqSPGLasebKWfj2fU0jPek51QoGSPnXKx/uOSamSARxRaghZ/o+ DQUf7khEzEigpSWKOz961iTh2gGXAhWUCZHX3azHkOjLeD8jIjBFWOYnAJsxeg2U E1ZvADJqucdjREs0896y1AK8o6u4WXzT0pSOa/VlpptKb9L0+kgKcOHnU+spLVCD uKZ/w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddugeekkeegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepfffhvfevuffkgggtugfgjgesthekredttddt jeenucfhrhhomheplmhlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlh hvhhdrnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepvefhledthffggfevheef gffhuddvgeehhedthedvleelgefhhedvueegjefgueevnecuffhomhgrihhnpegvnhhtvg hrphhrihhsvggusgdrtghomhdpphhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlh hvhhdrnhhoqdhiphdrohhrghdpnhgspghrtghpthhtohepiedpmhhouggvpehsmhhtphho uhhtpdhrtghpthhtohepshgvsggrshhtihgvnhdrfhhlrggvshgthhesgehjshdrtghomh dprhgtphhtthhopegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhr tghpthhtohepmhdrthgrrhhkvghshhifrghrrdhrrghosegvrhhitghsshhonhdrtghomh dprhgtphhtthhopegurghvihgurdhgrdhjohhhnhhsthhonhesghhmrghilhdrtghomhdp rhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghlsehpohhsthhgrhgvshhqlhdrohhrgh dprhgtphhtthhopehtghhlsehsshhsrdhpghhhrdhprgdruhhs X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 20 Mar 2025 13:48:28 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1742492907; bh=cljbYqSxdbp53rQJxDIbWhWSmH5GNQeyIK58NI4llqw=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=i+ZOtRhJWjWToW+cbIz4fTpq9+1ySUSstKx/GRdRK08fzcBdtuLfxo2Gwm/a4mABX 3oW7yo3vS9gjO9/QqJLv9U7F+ErhalzEYkAqdtFfkBl1PS+84Mx5ma3sfkBFm3rdd0 s+G7EO396H6fDJ48E/NQakXNUZ9qeZWfL75lZLLTMLVBAbtGSImRYVgbi4Ezn7S34P Rkgf1braaOCJqOGvB/fL8L9PDl6nltzEPDqa3nZ5St1QoiW1vsNZCosK/9pJQyieXR grCXS7omWdjhUfat2m/6tEl+MEMxpIVpnYIQS9Xx11O5QpNj5DwV2cINDFUyYIOPYQ Dta5/Q9fCoQHA== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 7A9617B; Thu, 20 Mar 2025 18:48:27 +0100 (CET) Date: Thu, 20 Mar 2025 18:48:27 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: "David G. Johnston" Cc: Sebastien Flaesch , Tom Lane , Adrian Klaver , M Tarkeshwar Rao , "pgsql-general@postgresql.org" Subject: Re: After upgrading libpq, the same function(PQftype) call returns a different OID Message-ID: <202503201748.wxkazqupyvuk@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-Mar-20, David G. Johnston wrote: > Yes, that blank line separating LSNOID and BOOLOID blocks the comment from > applying to the items after the blank line. That is a fairly common > convention, using whitespace to break things up. Also, assigning one macro > to another is quite distinct from assigning a constant to a name; making > the "backward compatibility" aspect of this comment only meaningfully apply > to those two items. That said, we could add a comment that makes this more obvious: diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h index ff666711a54..bce7d8796e2 100644 --- a/src/include/catalog/pg_type.h +++ b/src/include/catalog/pg_type.h @@ -341,6 +341,9 @@ MAKE_SYSCACHE(TYPENAMENSP, pg_type_typname_nsp_index, 64); */ #define CASHOID MONEYOID #define LSNOID PG_LSNOID +/* + * End of backwards compatibility section. + */ #endif /* EXPOSE_TO_CLIENT_CODE */ This looks a tad redundant in pg_type.h itself, but makes the generated pg_type_d.h file more obvious: /* * Backwards compatibility for ancient random spellings of pg_type OID macros. * Don't use these names in new code. */ #define CASHOID MONEYOID #define LSNOID PG_LSNOID /* * End of backwards compatibility section. */ #define BOOLOID 16 #define BYTEAOID 17 -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "I must say, I am absolutely impressed with what pgsql's implementation of VALUES allows me to do. It's kind of ridiculous how much "work" goes away in my code. Too bad I can't do this at work (Oracle 8/9)." (Tom Allison) http://archives.postgresql.org/pgsql-general/2007-06/msg00016.php