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:40:42 +0200
Message-ID: <584855e4-cd0a-0036-611a-81f088cb40c3@gmx.net> (raw)
In-Reply-To: <CAJCZkoJN-vAZLOU1XHxVjCfh1UYtJvup958wRph+upxP9wkj3w@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>
	<CAJCZkoKsYP6L91Rd3=8oxRh6K_GKZAFkmd1--PR4JWzqop_HSQ@mail.gmail.com>
	<CAJCZkoJN-vAZLOU1XHxVjCfh1UYtJvup958wRph+upxP9wkj3w@mail.gmail.com>

Durgamahesh Manne schrieb am 15.10.2018 um 11:18:
> was there any specific reason that you have given max length for varchar is limited to 10485760 value?
> 
> why you have not given max length for varchar is unlimited like text datatype ?
> 
> |character varying(/|n|/)|, |varchar(/|n|/)|variable-length with limit 
> |character(/|n|/)|, |char(/|n|/)|fixed-length, blank padded
> |text|variable unlimited length

It "text" type is a "character string" just like all the other character types and thus is also limited to 1GB

"text", "varchar", "character varying" and "character" are all identical in how they are stored and processed. 

Thomas








view thread (17+ messages)  latest in thread

Message-ID: <584855e4-cd0a-0036-611a-81f088cb40c3@gmx.net>
Permalink:  ../584855e4-cd0a-0036-611a-81f088cb40c3@gmx.net/
Also on:    postgresql.org/message-id/584855e4-cd0a-0036-611a-81f088cb40c3@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: <584855e4-cd0a-0036-611a-81f088cb40c3@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> <CAJCZkoKsYP6L91Rd3=8oxRh6K_GKZAFkmd1--PR4JWzqop_HSQ@mail.gmail.com> <CAJCZkoJN-vAZLOU1XHxVjCfh1UYtJvup958wRph+upxP9wkj3w@mail.gmail.com> <584855e4-cd0a-0036-611a-81f088cb40c3@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