custom function for converting human readable sizes to bytes

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема custom function for converting human readable sizes to bytes
Дата
Msg-id CAFj8pRD-tGoDKnxdYgECzA4On01_uRqPrwF-8LdkSE-6bDHp0w@mail.gmail.com
обсуждение исходный текст
Ответы Re: custom function for converting human readable sizes to bytes
Список pgsql-hackers
Hi

I have to write some filters, and filtering by size is "unfriendly" due calculation in bytes.

I propose inversion function to pg_size_pretty function - like pg_human_size.

Usage:

SELECT * FROM pg_class
  WHERE pg_table_size(oid) > pg_human_size('2GB');


Ideas, comments?

Regards

Pavel
 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: CreateFunction Statement
Следующее
От: Emre Hasegeli
Дата:
Сообщение: Re: new full text search configurations