pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-general@lists.postgresql.org
Subject: Re: Regarding varchar max length in postgres
Date: Mon, 15 Oct 2018 11:10:44 +0200
Message-ID: <69efedf7-6c12-cb3b-4fc6-e5ae9204bfc4@gmx.net> (raw)
In-Reply-To: <CAJCZkoKPAeT7G9B0oqJ7pH=PEyeeS6bviDmUyMsjgsAtKdDw+g@mail.gmail.com>
References: <CAJCZkoLyv+0J0ACodg+mjL=VXFBMrMKZWWXkwMGgUFkOz8byBw@mail.gmail.com>
	<a9d74f73-12a4-9b06-3ab3-1ff0bfeab01b@aklaver.com>
	<CAJCZkoKaRr3uR+w0+W91N7zmv9XcVmTKjZ0hCMg61s7VxcvkdA@mail.gmail.com>
	<CAJCZkoKPAeT7G9B0oqJ7pH=PEyeeS6bviDmUyMsjgsAtKdDw+g@mail.gmail.com>

Durgamahesh Manne schrieb am 15.10.2018 um 11:05:
>         On 10/5/18 8:18 AM, Durgamahesh Manne wrote:
>         > Hi
>         >
>         > please let me know the max length of varchar  & text in postgres
> 
>         https://www.postgresql.org/docs/10/static/datatype-character.html
> 
>      Hi 
> 
>     Thank you for this information
> 
>     as per the postgresql documentation   please ignore incomplete message i mailed to respected community members 
> 
>      If |character varying |is used without length specifier, the type accepts strings of any size 
> 
>     but varchar does not accept more than this 10485760 value
> 
> 
>    create table test(id serial primary key, str varchar(10485761));
> 
>      ERROR: length for type varchar cannot exceed 10485760 

Further down on that page the overall limit is documented: 

    In any case, the longest possible character string that can be stored is about 1 GB

So the part that you quoted implicitly means "accepts strings of any size  - up to the maximum of 1GB"
Maybe it makes sense to make that clearer at that point.

Regards
Thomas






view thread (17+ messages)  latest in thread

Message-ID: <69efedf7-6c12-cb3b-4fc6-e5ae9204bfc4@gmx.net>
Permalink:  ../69efedf7-6c12-cb3b-4fc6-e5ae9204bfc4@gmx.net/
Also on:    postgresql.org/message-id/69efedf7-6c12-cb3b-4fc6-e5ae9204bfc4@gmx.net

 · 

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: spam_eater@gmx.net
  Subject: Re: Regarding varchar max length in postgres
  In-Reply-To: <69efedf7-6c12-cb3b-4fc6-e5ae9204bfc4@gmx.net>
  References: <CAJCZkoLyv+0J0ACodg+mjL=VXFBMrMKZWWXkwMGgUFkOz8byBw@mail.gmail.com> <a9d74f73-12a4-9b06-3ab3-1ff0bfeab01b@aklaver.com> <CAJCZkoKaRr3uR+w0+W91N7zmv9XcVmTKjZ0hCMg61s7VxcvkdA@mail.gmail.com> <CAJCZkoKPAeT7G9B0oqJ7pH=PEyeeS6bviDmUyMsjgsAtKdDw+g@mail.gmail.com> <69efedf7-6c12-cb3b-4fc6-e5ae9204bfc4@gmx.net>

* 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