Re: custom function for converting human readable sizes to bytes - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: custom function for converting human readable sizes to bytes
Date
Msg-id CAFj8pRDqtR3xJAoHw+OCbMgLMr4fmLZR_uSXb96rN9L5pBKA8w@mail.gmail.com
Whole thread Raw
In response to Re: custom function for converting human readable sizes to bytes  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Responses Re: custom function for converting human readable sizes to bytes  (Guillaume Lelarge <guillaume@lelarge.info>)
List pgsql-hackers


2015-11-22 21:19 GMT+01:00 Jim Nasby <Jim.Nasby@bluetreble.com>:
On 11/22/15 2:11 PM, Pavel Stehule wrote:
What about pg_size(text), pg_size(value bigint, unit text) ?

I like, though I'd make it numeric or float. pg_size(3.5, 'GB') certainly seems like a reasonable use case...

yes, good note.

Regards

Pavel
 

--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com

pgsql-hackers by date:

Previous
From: Marko Tiikkaja
Date:
Subject: Re: count_nulls(VARIADIC "any")
Next
From: Jeff Janes
Date:
Subject: Re: Freeze avoidance of very large table.