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 1jTame-0001Qt-Ms for pgsql-admin@arkaria.postgresql.org; Wed, 29 Apr 2020 00:41:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jTamd-0001FV-Fp for pgsql-admin@arkaria.postgresql.org; Wed, 29 Apr 2020 00:41:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jTamd-0001E9-6n for pgsql-admin@lists.postgresql.org; Wed, 29 Apr 2020 00:41:03 +0000 Received: from impout006aa.msg.chrl.nc.charter.net ([47.43.20.30] helo=impout006.msg.chrl.nc.charter.net) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jTama-0007W0-C8 for pgsql-admin@lists.postgresql.org; Wed, 29 Apr 2020 00:41:01 +0000 Received: from cerberus.crazybean.net ([24.151.69.73]) by cmsmtp with ESMTP id TamYj0kqn6k6FTamYjwVBY; Wed, 29 Apr 2020 00:40:59 +0000 Authentication-Results: crazybean.net; none X-Authority-Analysis: v=2.3 cv=G8io7Os5 c=1 sm=1 tr=0 a=YXTuGtgWN9YX+aIhe8tYuA==:117 a=YXTuGtgWN9YX+aIhe8tYuA==:17 a=xqWC_Br6kY4A:10 a=cl8xLZFz6L8A:10 a=pGLkceISAAAA:8 a=-yAOVwnwJpHa0yqF0-4A:9 a=E6lnKv2LOGyp_SPd:21 a=FobK7nUhkcoFagPS:21 a=CjuIK1q_8ugA:10 a=Xr20G7HiGahljYz1jx0A:9 a=873FPKIoZFsjFSSM:21 a=e4XBTkIJb20v-GFP:21 a=OnwHYbCys3xC5vOc:21 a=_W_S_7VecoQA:10 Received: from [IPv6:2001:470:e117:4:45f1:366f:a08a:8c7] ( [2001:470:e117:4:45f1:366f:a08a:8c7]) by cerberus.crazybean.net (OpenSMTPD) with ESMTPSA id 29d7b91f (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Tue, 28 Apr 2020 20:40:58 -0400 (EDT) From: Rui DeSousa Message-Id: <6404DFBD-2864-473E-8807-C95D35C6C715@crazybean.net> Content-Type: multipart/alternative; boundary="Apple-Mail=_2A7D7A25-9CFD-4EC2-BDAA-D48F57376E2F" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: PostgreSQL CHARACTER VARYING vs CHARACTER VARYING (Length) Date: Tue, 28 Apr 2020 20:40:57 -0400 In-Reply-To: Cc: raf , Pgsql-admin To: "David G. Johnston" References: <20200428234332.7nkyomr2unlez6p5@raf.org> <8EC9D082-B541-435F-9EE3-3ED14AA3C2D1@crazybean.net> X-Mailer: Apple Mail (2.3608.80.23.2.2) X-CMAE-Envelope: MS4wfBUC7+/MCTWSiBLgeVtnw5D/0ZP37biBJdD9hYG50QOTqmp1apE+vESI0ihlHo/HwOurgZDIpxfGiPJa+d1ZJmlpSvIqxtgMLnRpvwyLyE0kJB58E+ok JE2rhLCpNPUoE9haZ9x5zzlxp0zQvZgW0BAQo1DOcBsCdiURhOh2O2+B1oSRmmWBOs28V7aTcs2h1s9qkQJ0B0gOD97gHsnkdiuf+eALe4Fj7MkJGuTahTpu 4pBL58Dc+33JUjOEn73g+g== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_2A7D7A25-9CFD-4EC2-BDAA-D48F57376E2F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Apr 28, 2020, at 8:34 PM, David G. Johnston = wrote: >=20 > Its less problematic now that increasing the generally arbitrary = length doesn't require a table rewrite but you still need to rebuild = dependent objects. >=20 To increase a column length does not require a table rewrite or table = scan; however, reducing its size will require a full table scan. So = cleaning up a schema like the one proposed sucks.=20= --Apple-Mail=_2A7D7A25-9CFD-4EC2-BDAA-D48F57376E2F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

On Apr 28, 2020, at 8:34 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:

Its less problematic now that increasing = the generally arbitrary length doesn't require a table rewrite but you = still need to rebuild dependent objects.


To increase a column length does not require = a table rewrite or table scan; however, reducing its size will require a = full table scan.  So cleaning up a schema like the one proposed = sucks. 
= --Apple-Mail=_2A7D7A25-9CFD-4EC2-BDAA-D48F57376E2F--