Using unnest

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Using unnest
Дата
Msg-id h4fplo$tps$1@ger.gmane.org
обсуждение исходный текст
Ответы Re: Using unnest
Список pgsql-general
Hi,

I was trying to use information from the pg_stats view, when I remembered that 8.4 now has the cool
unnest function.

However I can't seem to get this to work with a column defined as anyarray.

So my query is:

select histogram_bounds
from pg_stats
where tablename = 'my_table'
and attname = 'col1';

Now I would like to get the elements of the histogram_bounds column as a set, and thought that
unnest would help me here, but the following:

select unnest(histogram_bounds)
from pg_stats
where tablename = 'my_table'
and attname = 'col1';

gives me the error

argument declared "anyarray" is not an array but type anyarray

I'm pretty sure I'm overlooking something obvious with regards to the unnest syntax, but what?

Thanks
Thomas

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

Предыдущее
От: Kevin Kempter
Дата:
Сообщение: Re: where is pg_resetxlog ?
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Using unnest