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 1kCnqI-0006wh-HD for pgsql-docs@arkaria.postgresql.org; Mon, 31 Aug 2020 17:43:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kCnqH-0002By-Fw for pgsql-docs@arkaria.postgresql.org; Mon, 31 Aug 2020 17:43:41 +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 1kCnqH-0002Bj-AA for pgsql-docs@lists.postgresql.org; Mon, 31 Aug 2020 17:43:41 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kCnqD-00066O-Uq for pgsql-docs@lists.postgresql.org; Mon, 31 Aug 2020 17:43:40 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1kCnqB-0006yl-4I; Mon, 31 Aug 2020 13:43:35 -0400 Date: Mon, 31 Aug 2020 13:43:35 -0400 From: Bruce Momjian To: "David G. Johnston" Cc: Michael Paquier , 2552891@gmail.com, Pg Docs Subject: Re: Typo in the Section "3.6. Inheritance" Message-ID: <20200831174335.GH13613@momjian.us> References: <159586122762.680.1361378513036616007@wrigleys.postgresql.org> <20200805211243.GA19840@momjian.us> <20200805213656.GB19840@momjian.us> <20200806054119.GD16470@paquier.xyz> <20200821233641.GL13363@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 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: Precedence: bulk On Fri, Aug 21, 2020 at 07:09:31PM -0700, David G. Johnston wrote: > On Fri, Aug 21, 2020 at 4:36 PM Bruce Momjian wrote: > > On Wed, Aug  5, 2020 at 11:29:31PM -0700, David G. Johnston wrote: > > > Removing "char" from the tutorial is a nice side-effect that we probably > want > > to do even if we keep "state". > > I think CHAR(2) is fine because it is always 2 characters. > > > You imply "it is always two non-blank characters" though that isn't what CHAR > (2) means.  Adding CHECK (state ~ '^[A-Z]{2}$') and leaving the type as text > would be best from a pure model perspective - but this isn't the place to teach > that and for the same reason char(2) isn't terrible. > > > How is the attached patch, based on your suggestions? > > > Works for me. Patch applied back through 9.5. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee