Re: how to find out field size?

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Shaozhong SHI <shishaozhong(at)gmail(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: how to find out field size?
Date: 2022-04-04 15:37:19
Message-ID: 0c02aafa-6079-d6ad-fa1d-a3c36cb8cd19@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4/4/22 08:28, Shaozhong SHI wrote:
> Postgres documentation says:  maximum field size is 1 GB.
> PostgreSQL: Documentation: 12: Appendix K. PostgreSQL Limits
> <https://www.postgresql.org/docs/12/limits.html>
>
> So, how to find out the size of column to see how far it from the limit?

Documentation also shows:

https://www.postgresql.org/docs/current/functions-admin.html

pg_column_size ( "any" ) → integer

Shows the number of bytes used to store any individual data value. If
applied directly to a table column value, this reflects any compression
that was done.

>
> Regards,
>
> David
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Nolan 2022-04-04 16:15:26 Re: Trigger functions and FDW tables
Previous Message Shaozhong SHI 2022-04-04 15:28:37 how to find out field size?