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 1sP0VO-002Qu8-Gm for pgsql-general@arkaria.postgresql.org; Wed, 03 Jul 2024 13:58:42 +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 1sP0VM-009BYW-6i for pgsql-general@arkaria.postgresql.org; Wed, 03 Jul 2024 13:58:40 +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 1sP0VL-009BYN-RQ for pgsql-general@lists.postgresql.org; Wed, 03 Jul 2024 13:58:40 +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 1sP0VG-000EDW-4a for pgsql-general@postgresql.org; Wed, 03 Jul 2024 13:58:39 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 1BD292A2B7C for ; Wed, 3 Jul 2024 06:58:31 -0700 (PDT) Date: Wed, 3 Jul 2024 06:58:31 -0700 (PDT) From: Rich Shepard To: pgsql-general@postgresql.org Subject: Re: Accommodating alternative column values In-Reply-To: Message-ID: <74f52ac6-61cb-f995-34e5-16271b5c6832@appl-ecosys.com> References: <449bdf5-31d-9189-34d-5ce4188fe2@appl-ecosys.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2 Jul 2024, Christophe Pettus wrote: > To be clear, I wasn't suggesting stuffing them all into a text column with > a delimiter, but storing them in a text *array* field, each email address > one component of the array. Christophe, I'm not using the proper syntax and the postgres alter table doc has no example in the alter column choices. 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)[]". How do I incorporate the "USING email::..." string? TIA, Rich