Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUIIw-0004bY-FY for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Aug 2016 18:51:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bUIIw-0005mR-2M for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Aug 2016 18:51:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bUIIu-0005lU-TG for pgsql-hackers@postgresql.org; Mon, 01 Aug 2016 18:51:08 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bUIIr-0007sa-Mf for pgsql-hackers@postgresql.org; Mon, 01 Aug 2016 18:51:08 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 805522019F; Mon, 1 Aug 2016 14:51:04 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Mon, 01 Aug 2016 14:51:04 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=HFuRy8HC6F3Tpn6 Xhg5w5SXZtR0=; b=TVj34C06njHet9qVO8RfPpknm6JUa4wloH/to705SP6ce7u SoIqUOnplPoIAgOMWWoA95JWfGI/SE7VNwTA8DjK1XwGaPJs1eZtvU4AFBt1UTEf 098i/eXIyFgpyodMYx5zkZMxq7Ukc+r6iFtdh4iZ//+dByzGvwtn0nMusKvk= X-Sasl-enc: GMOdu5+U8UibY4X0eG7QSQjRQA5x1wN/mJanm3Z/FzHM 1470077464 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 1A3CCF29DC; Mon, 1 Aug 2016 14:51:04 -0400 (EDT) Subject: Re: [BUGS] BUG #14244: wrong suffix for pg_size_pretty() To: Pavel Stehule , "David G. Johnston" References: <20160712133638.1409.99068@wrigleys.postgresql.org> <20160730001838.GA22405@momjian.us> Cc: Bruce Momjian , thomas.berger@1und1.de, PostgreSQL-development From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Mon, 1 Aug 2016 14:51:03 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) 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 On 7/30/16 1:18 AM, Pavel Stehule wrote: > We talked about this issue, when I wrote function pg_size_bytes. It is > hard to fix these functions after years of usage. The new set of > functions can be better > > pg_iso_size_pretty(); > pg_iso_size_bytes(); One thing that would actually be nice for other reasons as well is a version of pg_size_pretty() that lets you specify the output unit, say, as a second argument. Because sometimes you want to compare two tables or something, and tells you one is 3GB and the other is 783MB, which doesn't really help. If I tell it to use 'MB' as the output unit, I could get comparable output. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, 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