Convert of string to array problem

From: Bård Grønbech <baard(dot)gronbech(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Convert of string to array problem
Date: 2010-04-29 12:35:24
Message-ID: w2gc74accdd1004290535yae6032depa737ba1ae3c463bd@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Have a string like '0.1;0.2;null;0.3' which I would like to convert
into a double precision[] array.

Trying:

select cast (string_to_array('0.1;0.2;null;0.3', ';') as float8[])

gives me an error: invalid input syntax for type double precision: "null".

Can anybody help me?

-Bård

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2010-04-29 12:46:48 Re: Problem: concat an array of arrays
Previous Message Craig Ringer 2010-04-29 12:32:18 Re: FW: Java Memory Issue while Loading Postgres library