t=# select version();
version
--------------------------------------------------------
PostgreSQL 8.3beta3, compiled by Visual C++ build 1400
(1 row)
t=# -- foo is of type unknown
t=# select '{1,2,3}' as foo;
foo
---------
{1,2,3}
(1 row)
t=# -- OK. foo is of type int[]
t=# select ('{1,2,3}')::int[] as foo;
foo
---------
{1,2,3}
(1 row)
t=# -- OK. foo is of type unknown
t=# select (('{1,2,3}'::text)::unknown) as foo;
foo
---------
{1,2,3}
(1 row)
t=# -- Barfs. Why?
t=# select (('{1,2,3}'::text)::unknown)::int[] as foo;
ERROR: failed to find conversion function from unknown to integer[]
Thanks for your time.