Re: SELECT CAST(123 AS char) -> 1 - Mailing list pgsql-general

From Ken Johanson
Subject Re: SELECT CAST(123 AS char) -> 1
Date
Msg-id 47B315CE.1000203@kensystem.com
Whole thread Raw
In response to Re: SELECT CAST(123 AS char) -> 1  (Andrew Sullivan <ajs@crankycanuck.ca>)
Responses Re: SELECT CAST(123 AS char) -> 1
List 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'.



pgsql-general by date:

Previous
From: Hermann Muster
Date:
Subject: Order of SUBSTR and UPPER in statement
Next
From: "Dave Page"
Date:
Subject: Re: msvcr80.dll and PostgreSQL 8.3 under Windows XP