ERROR: failed to find conversion function from unknown to integer[]

From: Rodrigo De León <rdeleonp(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: ERROR: failed to find conversion function from unknown to integer[]
Date: 2007-11-29 17:57:21
Message-ID: a55915760711290957j5684bf3bi346907ef7e40850e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-11-29 18:05:06 Re: Discrpency in the GRANT docs
Previous Message Tom Lane 2007-11-29 17:48:35 Re: HD is flooded by Error Log info