Re: Alter column from text[] to uuid[]

Поиск
Список
Период
Сортировка
От Keith Rarick
Тема Re: Alter column from text[] to uuid[]
Дата
Msg-id CAD25zGA+hxKEn8DA37PZ-2trbyr6oQ44Eb1swpekm5RufyW81A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Alter column from text[] to uuid[]  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Thu, Jun 11, 2015 at 12:57 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> alter table t alter u type uuid[] using u::uuid[];
>
> The original command worked without a USING because anything-to-text is
> considered an allowable assignment coercion; but the other way around
> requires an explicit cast.

Got it. Thanks!

I feel silly not to have tried that. Somehow I interpreted
"cannot be cast automatically to type uuid[]" as meaning
that it cannot be cast at all (and would therefore need a
more involved expression to specify how to convert it),
rather than that the cast merely needed to be explicit.


В списке pgsql-general по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: support for ltree
Следующее
От: "Yelai, Ramkumar IN BLR STS"
Дата:
Сообщение: Re: user constructed where clause