Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ycykk-00023f-HW for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2015 16:10:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Ycykk-00005W-12 for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2015 16:10:58 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Ycyki-00005P-6M for pgsql-hackers@postgreSQL.org; Tue, 31 Mar 2015 16:10:56 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Ycykf-0008NZ-4Z for pgsql-hackers@postgreSQL.org; Tue, 31 Mar 2015 16:10:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t2VGAmpM019401; Tue, 31 Mar 2015 12:10:48 -0400 From: Tom Lane To: Andres Freund cc: Michael Paquier , pgsql-hackers@postgreSQL.org, Andrew Gierth Subject: Re: [COMMITTERS] pgsql: Centralize definition of integer limits. In-reply-to: <20150331141423.GK4878@alap3.anarazel.de> References: <20150330104825.GE4878@alap3.anarazel.de> <10996.1427744296@sss.pgh.pa.us> <20150330195009.GC15659@awork2.anarazel.de> <20150331141423.GK4878@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Tue, 31 Mar 2015 16:14:23 +0200" Date: Tue, 31 Mar 2015 12:10:48 -0400 Message-ID: <19400.1427818248@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andres Freund writes: > On 2015-03-30 21:50:09 +0200, Andres Freund wrote: >> I'm too fried from the redeye back from pgconf nyc to do anything >> complicated, but it seems quite possible to define int64/uint64 based >> the stdint.h types if available. And generally a good idea too. I guess >> I'll try that tomorrow; unless Andrew beats me to it. > It's possible to do that, but it's not as trivial as I'd hoped. For one > we'd need to include stdint.h in some places we don't today > (postgres_ext.h), for another we'd need some uglyness to determine the > correct printf modifier for int64_t (can't use PRId64 etc afaics). Yeah, I thought the printf strings would be the sticking point :-( > I'm tempted to just prefix our limits with PG_ and define them > unconditionally, including appropriate casts to our types. I don't have a better idea. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers