Re: manipulating anyarray columns

From: Tomas Vondra <tv(at)fuzzy(dot)cz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: manipulating anyarray columns
Date: 2012-05-07 20:41:14
Message-ID: 4FA8336A.1090504@fuzzy.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2012-05-07 20:52:04 Re: Use LISTEN/NOTIFY between different databases
Previous Message John R Pierce 2012-05-07 20:23:53 Re: Use LISTEN/NOTIFY between different databases