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 1rxjhr-00BNiy-1I for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Apr 2024 08:34:51 +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 1rxjho-00HH6i-6F for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Apr 2024 08:34:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rxjhn-00HH0R-SH for pgsql-hackers@lists.postgresql.org; Fri, 19 Apr 2024 08:34:47 +0000 Received: from fhigh8-smtp.messagingengine.com ([103.168.172.159]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rxjhj-001lxU-Qc for pgsql-hackers@lists.postgresql.org; Fri, 19 Apr 2024 08:34:47 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 35F7F11400DC; Fri, 19 Apr 2024 04:34:41 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 19 Apr 2024 04:34:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm2; t=1713515681; x=1713602081; bh=Wnflkdp9FZKzhYkuBzW7DC8TM+mhnIbl SBz6XoGKX2k=; b=1K9MCrWfNmPYwHf7TVe8cQagUnHrhUmdA1NwrDg5HMnkSo3i HUOxN1L12BC6cajzPwUVNOxFP1koVBgdrVI8WSRr/8vKMA3V/X8uf0xJBQovWgxY 1gTvJuIPH+q+m0Dj5ILevp629STlKTuIz5QEEVx82Kl5MlZqRdtj9k1fg1GdOg7h HrrC6nh+Wo+Uypj6WsgztVRF1zVEey+h/1Js3MHcXrk7bZMea+1OaNfLXpkDG5LC giAK7B0TjZ9a52sf/Lp+QfUhbuxLNT7FM6HpU/7D3yfLzfMJIPOl1mPArNWyYTgU gIqC5yIrgJBPa6bfeht8lb9pzfOAsJDI6KltcA== 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 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1713515681; x= 1713602081; bh=Wnflkdp9FZKzhYkuBzW7DC8TM+mhnIblSBz6XoGKX2k=; b=H aRZQBRNHAUa3aN6PyvXXp3iYtiRglJUKuVWnu+eaG+EXfBAqeujAD/rq1ByRugYP /7MLGG61a2l86KmvwaDWqF56Jr9fVHrDepEbZEDzgMGOq/V37VoTJKl9P9CoR0cL Zw9h34cTNkdEN8hPYyU9eRtbYsJw9X24z/sfp5AZDSFiXGCUhXrTVwSTMVZgGZB8 cfFleFgAgVNh238zSuerdhRho0r96Htp1HDixY99zU4umgPk9aeK6DHjGJ/gli2Y a9/BmnjSjcFAiooL6llkQ2TZvtOSnw0ZC0KFi1kV8pO02lerJkf02BsxhsVHqQLd eun6/tVFU3cG7B9iT+owA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudekvddgtdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh eqnecuggftrfgrthhtvghrnhepleejtddugffgffefhfeiteefheetudekjeeutdelhfeg gfffudejheeufeduffeknecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghr segvihhsvghnthhrrghuthdrohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 19 Apr 2024 04:34:39 -0400 (EDT) Message-ID: <1a0cc462-5619-47ef-bad9-06b96b2f277f@eisentraut.org> Date: Fri, 19 Apr 2024 10:34:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Cannot find a working 64-bit integer type on Illumos To: Thomas Munro , Tom Lane Cc: Japin Li , Andres Freund , PostgreSQL Hackers References: <20240322165305.6zrtxcmzdrywvmsu@awork3.anarazel.de> <944094.1711128356@sss.pgh.pa.us> <1229869.1711160593@sss.pgh.pa.us> Content-Language: en-US From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 18.04.24 02:31, Thomas Munro wrote: > For limits, why do we have this: > > - * stdint.h limits aren't guaranteed to have compatible types with our fixed > - * width types. So just define our own. > > ? I mean, how could they not have compatible types? The commit for this was 62e2a8dc2c7 and the thread was . The problem was that something like snprintf(bufm, sizeof(bufm), INT64_FORMAT, SEQ_MINVALUE); could issue a warning if, say, INT64_FORMAT, which refers to our own int64, is based on long int, but SEQ_MINVALUE, which was then INT64_MIN, which refers to int64_t, which could be long long int. So this is correct. If we introduce the use of int64_t, then you need to be consistent still: int64, PG_INT64_MIN, PG_INT64_MAX, INT64_FORMAT int64_t, INT64_MIN, INT64_MAX, PRId64