ERROR: failed to find conversion function from unknown to integer[] - Mailing list pgsql-general

From Rodrigo De León
Subject ERROR: failed to find conversion function from unknown to integer[]
Date
Msg-id a55915760711290957j5684bf3bi346907ef7e40850e@mail.gmail.com
Whole thread Raw
List pgsql-general
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.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: HD is flooded by Error Log info
Next
From: Tom Lane
Date:
Subject: Re: Discrpency in the GRANT docs