Search Postgresql Archives

Re: Using unnest

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

 



Jeff Davis wrote on 25.07.2009 22:44:
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';

Great, thanks

I tried casting the column to text[] (because it contains elements of type text) but I didn't think of doing a two way cast.

Do I understand this correctly that by casting it first to text, I effectively create a new array the same way I create one, when I supply a literal like '{1,2,3}'::text[]

Thomas




--
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