Re: [GENERAL] convert custom datatype to array

2007-11-19 Thread Mike Charnoky
Thanks! That did the trick. For posterity, I was able to do the final conversion using: alter table mytable alter column mycolumn type float4[] using string_to_array(trim(both '[]' from textin(nbf4a_out(mycolumn))),',')::float4[]; Mike Alvaro Herrera wrote: > Mike Charnoky wrote: >> OK, forgi

Re: [GENERAL] convert custom datatype to array

2007-11-19 Thread Alvaro Herrera
Mike Charnoky wrote: > OK, forgive my ignorance here, but the maintainer of our custom data > type code is no longer with us and this is new territory for me. We do > have a function which takes our custom data type and returns a cstring. > Is there a pg function which converts a cstring to text

Re: [GENERAL] convert custom datatype to array

2007-11-19 Thread Mike Charnoky
OK, forgive my ignorance here, but the maintainer of our custom data type code is no longer with us and this is new territory for me. We do have a function which takes our custom data type and returns a cstring. Is there a pg function which converts a cstring to text type? This seems to be the m

Re: [GENERAL] convert custom datatype to array

2007-11-19 Thread Alvaro Herrera
Mike Charnoky wrote: > Our database schema was designed before postgresql supported arrays and > contains a custom type which is basically a float4 array. I would like > to clean things up and convert the custom datatype to float4[], as this > would obviate the need for us to compile a custom shar

[GENERAL] convert custom datatype to array

2007-11-19 Thread Mike Charnoky
Our database schema was designed before postgresql supported arrays and contains a custom type which is basically a float4 array. I would like to clean things up and convert the custom datatype to float4[], as this would obviate the need for us to compile a custom shared object. We are hitting pr