Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hYJ6t-0006Bw-B3 for pgsql-general@arkaria.postgresql.org; Tue, 04 Jun 2019 23:44:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hYJ6r-0002Rt-8V for pgsql-general@arkaria.postgresql.org; Tue, 04 Jun 2019 23:44:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hYJ6q-0002Rj-VQ for pgsql-general@lists.postgresql.org; Tue, 04 Jun 2019 23:44:53 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hYJ6k-00008H-KY for pgsql-general@lists.postgresql.org; Tue, 04 Jun 2019 23:44:52 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 97E209938B for ; Tue, 4 Jun 2019 16:44:43 -0700 (PDT) Date: Tue, 4 Jun 2019 16:44:43 -0700 (PDT) From: Rich Shepard To: "pgsql-generallists.postgresql.org" Subject: Re: Converting yes or no to one letter strings. In-Reply-To: Message-ID: References: <555b017e-2449-43a4-19e6-4c19af6017e3@dayspringpublisher.com> User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, 4 Jun 2019, David G. Johnston wrote: > Actually, given that "f" is becoming multiple different values it seems > like the OP is improving upon their data model. That should very much be > done at the table level at not relegated to views, let alone a UI layer. > > It is not unusual to want to convert something that was a simple boolean > to an enumeration of values. Though it is probably better to add a new > column to reflect the new model element and effectively deprecate the old > column - eventually removing it from use when it is no longer needed. > Altering the column type, while possible, is not usually desirable. In > particular it makes rolling back (or supporting older) client software > more difficult because the old version will not recognize the new field > and the old field will be gone. David, Thanks for the insights. Rich