coalesce a null to a char ? - Mailing list pgsql-general

From Gauthier, Dave
Subject coalesce a null to a char ?
Date
Msg-id 482E80323A35A54498B8B70FF2B8798003F77719FA@azsmsx504.amr.corp.intel.com
Whole thread Raw
Responses Re: coalesce a null to a char ?
List pgsql-general

How can I do this....

 

selcet coalesce((select ‘y’ from foo where name = f.name),’n’) from foo f where...

 

So the query returns a “y” or “n” depending on whether or not the subquery is null.

 

I get...

 

“ERROR: failed to find conversion function from unknown to text”

 

 

pgsql-general by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: tsearch2 dictionary for statute cites
Next
From: Raymond O'Donnell
Date:
Subject: Re: coalesce a null to a char ?