Re: Join a varchar array

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Join a varchar array
Дата
Msg-id 40D16682.2040606@archonet.com
обсуждение исходный текст
Ответ на Join a varchar array  (Robin Ericsson <robin.ericsson@profecta.se>)
Ответы Re: Join a varchar array  (Robin Ericsson <robin.ericsson@profecta.se>)
Список pgsql-general
Robin Ericsson wrote:
> Hi,
>
> I have a field in which I save the follow:
> {{8,0.58},{9,972420},{10,239544},{6,0.49},{7,0.63}}
>
> The first field is a reference to an id in another table and the second
> field is a value.
>
> Can these values be used somehow in a select query to join the other
> table?

You appear to be using the array as a replacement for a table. Don't do
that. From the little information you've provided, it looks like you
want a separate table (a_ref, b_ref, float_val) where a_ref references
the current table, b_ref the other table.

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: John Sidney-Woollett
Дата:
Сообщение: Re: index with LIKE
Следующее
От: Robin Ericsson
Дата:
Сообщение: Re: Join a varchar array