Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 11, 2015 at 12:57 PM Tom Lane <tgl@xxxxxxxxxxxxx> 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.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux