Search Postgresql Archives

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

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

 



Ken Johanson wrote:
> Alvaro Herrera wrote:
>> If you are arguing that the spec's definition of the CHARACTER type is
>> not really very useful, I think you are going to find a lot of
>> supporters.  You can send your complaints to the SQL committee; but
>> then, it is unlikely that this is going to change anytime soon because
>> of the fear of breaking backwards compatibility.
>
> Agreed. There may be allot of users who in the case of CAST, need to  
> extract the leftmost digit, and for those database and their users that  
> do this by default, it would cause harm.

Right.  And those that don't need that are certainly using a cast to
CHARACTER VARYING.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[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