Using unnest - Mailing list pgsql-general

From Thomas Kellerer
Subject Using unnest
Date
Msg-id h4fplo$tps$1@ger.gmane.org
Whole thread Raw
Responses Re: Using unnest
List 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 by date:

Previous
From: Kevin Kempter
Date:
Subject: Re: where is pg_resetxlog ?
Next
From: Jeff Davis
Date:
Subject: Re: Using unnest