Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gBytq-0006fJ-3o for pgsql-general@arkaria.postgresql.org; Mon, 15 Oct 2018 09:10:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gByto-00009U-AV for pgsql-general@arkaria.postgresql.org; Mon, 15 Oct 2018 09:10:52 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gBytn-00009J-VS for pgsql-general@lists.postgresql.org; Mon, 15 Oct 2018 09:10:52 +0000 Received: from mout.kundenserver.de ([217.72.192.73]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gBytl-0002WG-AM for pgsql-general@lists.postgresql.org; Mon, 15 Oct 2018 09:10:50 +0000 Received: from [10.8.0.146] ([185.40.248.10]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPSA (Nemesis) id 1MVdYY-1g23IP1zxk-00RVxt for ; Mon, 15 Oct 2018 11:10:45 +0200 Received: from [10.8.0.146] ([185.40.248.10]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPSA (Nemesis) id 1MVdYY-1g23IP1zxk-00RVxt for ; Mon, 15 Oct 2018 11:10:45 +0200 Subject: Re: Regarding varchar max length in postgres To: pgsql-general@lists.postgresql.org Newsgroups: gmane.comp.db.postgresql.general References: From: Thomas Kellerer Message-ID: <69efedf7-6c12-cb3b-4fc6-e5ae9204bfc4@gmx.net> Date: Mon, 15 Oct 2018 11:10:44 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:RJjxYdgIfPX2uWJk08eGOcv3cBNsaHJMLfssHwBRqptLPSXF0dF usIn4cPQ2b4nEOkmiPsF1IFZ0g6JC/3OvLe7uUosJ1WKoX1H6bFI6g+xph0BVAE2NZ7jJ13 7oNno+9785aRw8wTXjimW8iDjnvnYLRbBt5fqkMKwWC28NoDPZ9Mhl1FM8IfpUUtNxA8lUM 05RcDiMzx52bE2reuStoQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:WAhaBsUaNXY=:B/2NyBCrgfIjbCpiNFgtBg k2vli+tROYkWIlSMs+V2uluwBjW83bEPAPDXNkmOQvanbU2cEHaJD3w69LNhqk6RPXc20dajt udYW5vJFIvGPngVccSTK8M1ptZJJWS004lFntEhnLScQhgCPzFExOCUwFWHlywF4lN5NUER3x /FluoO+K1D9Xps4VQ7XsF1cbjyi1dgPucRroAFShCeSqNncHVfg+PByi7TyfJALFH+MOfAzCp YJz2G3dhJb6rUdZeuflX/NBn9WtHutva3wl1zKKBMEgLs1xVkF+frsUg1xjC0OaSbP3l/ZacH YgvvCPWw8NmZLn0hPH2bdokDeoG21Ln2VLVtabWrqs8ml7QP9gcpFTD9zx8cJuF5slJ7kRgxP qVV7J72YDYD+NoIN38W9DeOLa8CaRfqQgJssAYtmS1sp3KiisYcfdi7jMfi0aUt72a06dXHvJ zWRkf+lVjebo/Ry3eJsS6AOriEVHMFPWS/Z8V7rnz3lauk2hq8Bx6nb8kA68H9rRpInn1vYuU SFFnNTO+ezSXsd1bNar02o7qXmccQmStfA97gIlPgVXmaXWIg8FWKo1x7RWYqetpuZfcYGix+ i4bCHNunqrfDxKLkxCZDYcr5SP3Z+aVvi1cMVzqgldUy150hN/4CoLtQdzK2WLUQXsEOtByzl RyYTLeQ8zie/hxXgh/plET+uGj+TJUZ2bIRncOcUzOGKGx2Zib3ZIARta2IbyL8HJP+yefI0S rwk6bkYdrI/6k977 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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