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

2015-06-12 Thread Keith Rarick
On Thu, Jun 11, 2015 at 12:57 PM Tom Lane 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

[GENERAL] Alter column from text[] to uuid[]

2015-06-11 Thread Keith Rarick
I have a table: kr=# create table t (u uuid[]); CREATE TABLE Time: 3.742 ms kr=# insert into t values ('{"0289b709-3cd7-431c-bcbe-f942eb31b4c5","86cc14d6-7293-488e-a85f-384ae6773d28"}'); INSERT 0 1 Time: 1.735 ms I recently did the following: kr=# alter table t alter u type text[]; ALTER TABLE T