From: John Scalia <jayknowsunix@gmail.com>
To: dbatoCloud Solution <dbatocloud17@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Looking find the each row size of table
Date: Fri, 19 Feb 2021 07:36:07 -0500
Message-ID: <FC63CF67-F60D-4424-992A-AFB5408A9650@gmail.com> (raw)
In-Reply-To: <CAEz7P_s44M2u4bL5ebEdY3v+K3YdUqrG67PQ5U_PasGLH2vhgA@mail.gmail.com>
References: <CAEz7P_s44M2u4bL5ebEdY3v+K3YdUqrG67PQ5U_PasGLH2vhgA@mail.gmail.com>
pg_column_size returns the number of bytes with no formatting at all. Do something like select pg_size_pretty(pg_column_size(my_column) / 1024) would give you the value in Kbytes, further calculation in the same manner could convert this into Mbytes, Gbytes, or whatever you need.
—
Jay
Sent from my iPad
> On Feb 19, 2021, at 7:28 AM, dbatoCloud Solution <dbatocloud17@gmail.com> wrote:
>
>
> Dear All,
> I want to find out each row size of a table in PostgreSQL?
> I got pg_column_size() function. Could you please someone help me? Will this function return size in KB or MB?
>
>
>
>
> Thanks & Best Wishes,
>
> Ashok
>
>
>
> ---------------------------------------------------------------------------------------------------------------------
>
> Ashokkumar Mani (OCP12c/11g/10g/9i, AWS SAA, M103)
>
> Dubai , UAE | BLR , INDIA
>
> M: +971 54 723 0075 | +91 90086 70302 | WApp : +91 81975 99922
>
> W: https://dbatocloudsolution.blogspot.in/ | E: dbatocloud17@gmail.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: jayknowsunix@gmail.com, dbatocloud17@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Looking find the each row size of table
In-Reply-To: <FC63CF67-F60D-4424-992A-AFB5408A9650@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox