Re: case / coalesce problem with strings WORKAROUND - Mailing list pgsql-bugs

From Dino Dini
Subject Re: case / coalesce problem with strings WORKAROUND
Date
Msg-id 001801c05830$513b7720$c5d32304@pod1.com
Whole thread Raw
List pgsql-bugs
I just find a workaround, which also may shed light on the bug itself:

select 'hello ' || coalesce('there','there',0::text);
  ?column?
-------------
 hello there
(1 row)

And this is very strange indeed:

select 'hello ' || coalesce('there','there',0);
    ?column?
-----------------
 hello 136357064
(1 row)

There is obviously a serious typing bug :-)

-Dino

----- Original Message -----
From: "Dino Dini" <dino@pod-1.com>
To: <pgsql-bugs@postgresql.org>
Sent: Sunday, November 26, 2000 9:03 PM
Subject: case / coalesce problem with strings


> select 'hello ' || coalesce('there','there');
> ERROR:  Function 'text(unknown)' does not exist
>         Unable to identify a function that satisfies the given argument
> types
>         You may need to add explicit typecasts
>
> It seems clear that the coalesce construction must return a string - so
why
> does this fail?
>
> The followinfg works just fine:
>
>
> -Dino
>

pgsql-bugs by date:

Previous
From: "Dino Dini"
Date:
Subject: case / coalesce problem with strings
Next
From: Karla Peralta
Date:
Subject: PortalHeapMemoryFree...in diskless client