Re: Convert of string to array problem

Поиск
Список
Период
Сортировка
От Thom Brown
Тема Re: Convert of string to array problem
Дата
Msg-id t2ibddc86151004290552w2f791ee6jcc9572e62e829cb8@mail.gmail.com
обсуждение исходный текст
Ответ на Convert of string to array problem  (Bård Grønbech <baard.gronbech@gmail.com>)
Ответы Re: Convert of string to array problem  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-general
On 29 April 2010 13:35, Bård Grønbech <baard.gronbech@gmail.com> wrote:
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


I believe string_to_array will take that null as a string called 'null', which it can't convert to a float8.

Regards

Thom

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

Предыдущее
От:
Дата:
Сообщение: Re: FW: Java Memory Issue while Loading Postgres library
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Problem: concat an array of arrays