Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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'.



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux