Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ycww6-0005zE-6e for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2015 14:14:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Ycww5-0003LA-L5 for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2015 14:14:33 +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 1Ycww3-0003HF-5i for pgsql-hackers@postgreSQL.org; Tue, 31 Mar 2015 14:14:31 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ycwvz-000645-9J for pgsql-hackers@postgreSQL.org; Tue, 31 Mar 2015 14:14:29 +0000 Received: from intern.anarazel.de (p5DDC7753.dip0.t-ipconnect.de [93.220.119.83]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id B3B51860001; Tue, 31 Mar 2015 16:14:24 +0200 (CEST) Date: Tue, 31 Mar 2015 16:14:23 +0200 From: Andres Freund To: Tom Lane Cc: Michael Paquier , pgsql-hackers@postgreSQL.org, Andrew Gierth Subject: Re: [COMMITTERS] pgsql: Centralize definition of integer limits. Message-ID: <20150331141423.GK4878@alap3.anarazel.de> References: <20150330104825.GE4878@alap3.anarazel.de> <10996.1427744296@sss.pgh.pa.us> <20150330195009.GC15659@awork2.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150330195009.GC15659@awork2.anarazel.de> X-Pg-Spam-Score: -4.2 (----) 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 Hi, 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). I'm tempted to just prefix our limits with PG_ and define them unconditionally, including appropriate casts to our types. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers