pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Shaozhong SHI <shishaozhong@gmail.com>
To: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: how to find out field size?
Date: Mon, 4 Apr 2022 08:37:19 -0700
Message-ID: <0c02aafa-6079-d6ad-fa1d-a3c36cb8cd19@aklaver.com> (raw)
In-Reply-To: <CA+i5JwYqegWHbhtQAjmCRn5r1DQb_vUbk+ftWF3nNB2eyj+Y=Q@mail.gmail.com>
References: <CA+i5JwYqegWHbhtQAjmCRn5r1DQb_vUbk+ftWF3nNB2eyj+Y=Q@mail.gmail.com>

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.klaver@aklaver.com





view thread (2+ messages)

Message-ID: <0c02aafa-6079-d6ad-fa1d-a3c36cb8cd19@aklaver.com>
Permalink:  ../0c02aafa-6079-d6ad-fa1d-a3c36cb8cd19@aklaver.com/
Also on:    postgresql.org/message-id/0c02aafa-6079-d6ad-fa1d-a3c36cb8cd19@aklaver.com

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, shishaozhong@gmail.com
  Subject: Re: how to find out field size?
  In-Reply-To: <0c02aafa-6079-d6ad-fa1d-a3c36cb8cd19@aklaver.com>
  References: <CA+i5JwYqegWHbhtQAjmCRn5r1DQb_vUbk+ftWF3nNB2eyj+Y=Q@mail.gmail.com> <0c02aafa-6079-d6ad-fa1d-a3c36cb8cd19@aklaver.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