Re: Get DB Size by row - Mailing list pgsql-general

From Bill Moran
Subject Re: Get DB Size by row
Date
Msg-id 20120721070340.7f04b0733a87f346f57c6ac3@potentialtech.com
Whole thread Raw
In response to Get DB Size by row  (Benjamin Adams <freebsdworld@gmail.com>)
List pgsql-general
On Fri, 20 Jul 2012 08:27:37 -0400 Benjamin Adams <freebsdworld@gmail.com> wrote:

> Hello,
>
> I'm looking to do something like:
>
> select month, mb_size(description) from data where year = 2012 group by month
>
> I also am looking for raw size not compressed size.

octet_length() will give you the size in bytes.  It's not the size in
characters, though, unless the field is using an encoding that's always
1 byte per character.  For character length, use (obviously)
character_length().

--
Bill Moran <wmoran@potentialtech.com>

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: High CPU on read-only streaming replication server
Next
From: Craig Ringer
Date:
Subject: Re: Why is an ISO-8859-8 database allowing values not within that set?