Re: ERROR: failed to find conversion function from "unknown" to text - Mailing list pgsql-hackers

From Gurjeet Singh
Subject Re: ERROR: failed to find conversion function from "unknown" to text
Date
Msg-id 65937bea0901052237j50657573i8c980f9f5f4814d5@mail.gmail.com
Whole thread Raw
In response to Re: ERROR: failed to find conversion function from "unknown" to text  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Responses Re: ERROR: failed to find conversion function from "unknown" to text
List pgsql-hackers
As I mentioned, we cannot change the query, so adding casts to the query is not an option. I was looking for something external to the query, like a CREATE CAST command that'd resolve the issue.

Best regards,

On Tue, Jan 6, 2009 at 12:00 PM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
Hello

2009/1/6 Gurjeet Singh <singh.gurjeet@gmail.com>:
> Q1: select '' union all select ''
> Q2: select '' union all select * from (select '' ) as s
>
> version: PostgreSQL 8.3.1, compiled by Visual C++ build 1400
>
> Hi All,
>
>     Q1 works just fine, but Q2 fails with:
>
> ERROR:  failed to find conversion function from "unknown" to text
>
>     Q2 is a generalization of a huge query we are facing, which we cannot
> modify. I don't think this is a 'removed-casts' problem generally faced in
> 8.3, but I may be wrong. Will adding some cast resolve this?

yes

postgres=#  select '' union all select * from (select ''::text ) as s;
 ?column?
----------


(2 rows)

regards
Pavel Stehule

>
> Best regards,
> --
> gurjeet[.singh]@EnterpriseDB.com
> singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com
>
> EnterpriseDB      http://www.enterprisedb.com
>
> Mail sent from my BlackLaptop device
>



--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com

EnterpriseDB      http://www.enterprisedb.com

Mail sent from my BlackLaptop device

pgsql-hackers by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: ERROR: failed to find conversion function from "unknown" to text
Next
From: "Pavel Stehule"
Date:
Subject: Re: ERROR: failed to find conversion function from "unknown" to text