Re: Accommodating alternative column values - Mailing list pgsql-general

From Rich Shepard
Subject Re: Accommodating alternative column values
Date
Msg-id 74f52ac6-61cb-f995-34e5-16271b5c6832@appl-ecosys.com
Whole thread Raw
In response to Re: Accommodating alternative column values  (Christophe Pettus <xof@thebuild.com>)
Responses Re: Accommodating alternative column values
Re: Accommodating alternative column values
Re: Accommodating alternative column values
List pgsql-general
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



pgsql-general by date:

Previous
From: Reid Thompson
Date:
Subject: Re: printing PGresult content with gdb
Next
From: "David G. Johnston"
Date:
Subject: Re: Accommodating alternative column values