Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hGsYT-0006Za-FF for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Apr 2019 21:57:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hGsYR-0005d6-P7 for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Apr 2019 21:57:19 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hGsYR-0005bo-Dk for pgsql-hackers@lists.postgresql.org; Wed, 17 Apr 2019 21:57:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hGsYP-0005sf-6C for pgsql-hackers@lists.postgresql.org; Wed, 17 Apr 2019 21:57:18 +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 x3HLvE1x030312; Wed, 17 Apr 2019 17:57:14 -0400 From: Tom Lane To: Fabien COELHO cc: PostgreSQL Developers Subject: Re: pgsql: Fix unportable code in pgbench. In-reply-to: References: Comments: In-reply-to Fabien COELHO message dated "Wed, 17 Apr 2019 23:46:09 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30310.1555538234.1@sss.pgh.pa.us> Date: Wed, 17 Apr 2019 17:57:14 -0400 Message-ID: <30311.1555538234@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Fabien COELHO writes: >> Fix unportable code in pgbench. > Sorry for this unforseen issue... portability is a pain:-( I think it's my fault, actually --- I don't remember how much of that patch was yours. > Yep, but ISTM that it is down to 32 bits, Only on 32-bit-long machines, which are a dwindling minority (except for Windows, which I don't really care about). > So the third short is now always 0. Hmmm. I'll propose another option over > the week-end. I suppose we could put pg_strtouint64 somewhere where pgbench can use it, but TBH I don't think it's worth the trouble. The set of people using the --random-seed=int option at all is darn near empty, I suspect, and the documentation only says you can write an int there. regards, tom lane