On 6.5.2012 16:41, Jov wrote:
> I find this work:
> 
> SELECT (most_common_vals::varchar::varchar[])[1:3]
>  FROM pg_stats
>  WHERE tablename = 'pg_attribute' AND attname = 'attname';
> 
> I try cast anyarray to varchar[] directly but failed,do'nt know why pg
> not support the cast.

IMHO this is exactly what I did, except that I casted the array to
string and back by calling functions (array_to_string/string_to_array)
and you did that by casting.

Tomas

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

Reply via email to