Search Postgresql Archives

Re: Using unnest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2009-07-25 at 22:24 +0200, Thomas Kellerer wrote:
> 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.

It's generally hard to work with values of type anyarray. You have to
cast them to text and then to a normal array type.

For example:

  select unnest(histogram_bounds::text::oid[]) from pg_stats where 
         tablename='pg_amop' and attname='amopopr';

Regards,
	Jeff Davis


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux