Re: SELECT CAST(123 AS char) -> 1

From: Ken Johanson <pg-user(at)kensystem(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: SELECT CAST(123 AS char) -> 1
Date: 2008-02-13 16:07:42
Message-ID: 47B315CE.1000203@kensystem.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Andrew Sullivan wrote:

>
> No, you're trying to convey that it is more benign/useful _to you_. Others
> are arguing that they want to write conformant code, and don't much care
> what MyOccasionallyReadTheSpec does. It's a pity that SQL conformance is
> not better across systems, but surely the way to improve that is to reduce
> the number of products that are being careless, not to increase them?
>

Let's leave it as-is then. We'll conform to the spec, and this good
since someone may want to extract the leftmost char from a base-10
number representation.

Henceforth SELECT CAST(123 AS char) will and should undisputedly return '1'.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dave Page 2008-02-13 16:12:29 Re: msvcr80.dll and PostgreSQL 8.3 under Windows XP
Previous Message Peter Wilson 2008-02-13 15:21:51 Re: Storing images as BYTEA or large objects