Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mj180-0000Ei-Ea for pgsql-docs@arkaria.postgresql.org; Fri, 05 Nov 2021 15:27:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mj17z-0003P6-D0 for pgsql-docs@arkaria.postgresql.org; Fri, 05 Nov 2021 15:27:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mj17z-0003Ox-6K for pgsql-docs@lists.postgresql.org; Fri, 05 Nov 2021 15:27:39 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mj17w-0003aH-Kc for pgsql-docs@lists.postgresql.org; Fri, 05 Nov 2021 15:27:38 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1mj17t-00077s-Ri; Fri, 05 Nov 2021 11:27:33 -0400 Date: Fri, 5 Nov 2021 11:27:33 -0400 From: Bruce Momjian To: "David G. Johnston" Cc: Laurenz Albe , Grega Jesih , Tom Lane , Pg Docs Subject: Re: text fields and performance for ETL Message-ID: <20211105152733.GC19812@momjian.us> References: <686716cb5c4242c28e5967d9b6fcfc75@actual-it.si> <137264.1635961048@sss.pgh.pa.us> <70cf9fe110c246afb4eab054caab0c04@actual-it.si> <516dc58b80fa418091f5262879019213@actual-it.si> <20211105141712.GA19812@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Nov 5, 2021 at 07:32:12AM -0700, David G. Johnston wrote: > On Friday, November 5, 2021, Bruce Momjian wrote: > > > > > > Perhaps, right before the tip you quoted, something like that: > > > >   If your use case requires a length limit on character data, or > compliance > >   with the SQL standard is important, use "character varying". > >   Otherwise, you are usually better off with "text". > > I can support that if others think it is valuable. > > > > The motivating complaint is that we should be encouraging people to use varchar > (4000) instead of text so external tools can optimize.  If we are not going to > do that I really don’t see the pointing in changing away from out current > position of “only use text”.  True length limit requirements for data are rare, > and better done in constraints along with all other the other constraint that > may exist for the data.  I believe comments with respect to the SQL standard > are already present and adequate. Agreed. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com If only the physical world exists, free will is an illusion.