Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sP0aK-002RJp-Ew for pgsql-general@arkaria.postgresql.org; Wed, 03 Jul 2024 14:03:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sP0aI-009Hrs-E2 for pgsql-general@arkaria.postgresql.org; Wed, 03 Jul 2024 14:03:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sP0aI-009Hrk-2J for pgsql-general@lists.postgresql.org; Wed, 03 Jul 2024 14:03:46 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sP0aG-000EGg-Mz for pgsql-general@postgresql.org; Wed, 03 Jul 2024 14:03:46 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 57B4E2A2B7C for ; Wed, 3 Jul 2024 07:03:42 -0700 (PDT) Date: Wed, 3 Jul 2024 07:03:42 -0700 (PDT) From: Rich Shepard Reply-To: Rich Shepard To: pgsql-general@postgresql.org Subject: Re: Accommodating alternative column values In-Reply-To: <74f52ac6-61cb-f995-34e5-16271b5c6832@appl-ecosys.com> Message-ID: <3eb9a2d3-28c-9066-d3b5-fd6cca32af9@appl-ecosys.com> References: <449bdf5-31d-9189-34d-5ce4188fe2@appl-ecosys.com> <74f52ac6-61cb-f995-34e5-16271b5c6832@appl-ecosys.com> 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: Archived-At: Precedence: bulk On Wed, 3 Jul 2024, Rich Shepard wrote: > What I've tried: > bustrac=# alter table people alter column email set data type varchar(64) []; > ERROR: column "email" cannot be cast automatically to type character > varying[] > HINT: You might need to specify "USING email::character varying(64)[]". What I forgot to mention is that the current datatype is varchar(64) and I want to make it an array. Rich