public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: Rich Shepard <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Accommodating alternative column values
Date: Wed, 3 Jul 2024 07:05:36 -0700
Message-ID: <CAKFQuwYGP6geSx61RUuvH07D+CDHWOiZNXi+WpB3U=QJ7h_Dgg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

On Wednesday, July 3, 2024, Rich Shepard <[email protected]> wrote:

> 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.
>
>
Yeah, the simply cast suggested will not work.  You’d have to apply an
expression that turns the current contents into an array.  The current
contents are not likely to be an array literal.

David J.


view thread (7+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Accommodating alternative column values
  In-Reply-To: <CAKFQuwYGP6geSx61RUuvH07D+CDHWOiZNXi+WpB3U=QJ7h_Dgg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox