Re: <no subject>

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Daniel Schuchardt <daniel_schuchardt(at)web(dot)de>
Cc: PostgreSQL general list <pgsql-general(at)postgresql(dot)org>, dev(at)archonet(dot)com
Subject: Re: <no subject>
Date: 2003-10-01 10:52:11
Message-ID: 1065005531.2918.16.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2003-10-01 at 11:32, Daniel Schuchardt wrote:
> Read the docs...
>
> Hm looking towards the doks thats the right behavoir. Also from the
> logical point thats the right behavoir. But I don't like it. The CAST
> should return an empty string in that case (looking from the practical
> standpoint).

All CAST is doing is changing the type of the datum; it does not change
its value except perhaps as a side effect. A null string is not the
same as an empty string. I don't at all see why you should expect
anything different, especially when the COALESCE() function is already
provided to do exactly what you want.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Yet if any man suffer as a Christian, let him not be
ashamed; but let him glorify God on this behalf."
I Peter 4:16

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Leitich 2003-10-01 11:23:46 adressing columns
Previous Message Richard Huxton 2003-10-01 10:47:44 Re: <no subject>