Re: [PERFORM] Array fundamentals

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: [PERFORM] Array fundamentals
Дата
Msg-id 1338657695.27686.7.camel@jdavis
обсуждение исходный текст
Список pgsql-general
On Sat, 2012-06-02 at 10:05 -0700, idc danny wrote:
> Now, if I want do do the following:
> select CombineStrings(ARRAY[SplitString2Array("SomeTextColumn"), 'New
> string to add']) from "SomeTable"
>
> i get the following error:
> array value must start with "{" or dimension information

This discussion is better suited to another list, like -general, so I'm
moving it there.

In the fragment:
  ARRAY[SplitString2Array("SomeTextColumn"), 'New string to add']
The first array element is itself an array of strings, but the second is
a plain string. Array elements must all be the same type.

What you want to do is replace that fragment with something more like:
  array_append(SplitString2Array("SomeTextColumn"), 'New string to add')

If that still doesn't work, we'll need to see the exact definitions of
your functions.

Also, as a debugging strategy, I recommend that you look at the pieces
that do work, and slowly build up the fragments until it doesn't work.
That will allow you to see the inputs to each function, and it makes it
easier to see why it doesn't work.

Regards,
    Jeff Davis


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

Предыдущее
От: Samba
Дата:
Сообщение: Re: select current_setting('transaction_isolation')
Следующее
От: Alexander Reichstadt
Дата:
Сообщение: SELECT issue with references to different tables