Re: case / coalesce problem with strings WORKAROUND

From: "Dino Dini" <dino(at)pod-1(dot)com>
To: "Dino Dini" <dino(at)pod-1(dot)com>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: case / coalesce problem with strings WORKAROUND
Date: 2000-11-27 05:10:10
Message-ID: 001801c05830$513b7720$c5d32304@pod1.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)pod-1(dot)com>
To: <pgsql-bugs(at)postgresql(dot)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
>

Browse pgsql-bugs by date

  From Date Subject
Next Message Steffen C. Hulegaard 2000-11-27 09:33:04 Cross-named & compound foreign key constraints fail
Previous Message Dino Dini 2000-11-27 05:03:14 case / coalesce problem with strings