![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Dear all, While checking the last Beta3-Beta4 Changelog of Postgres 8.0, I saw the following: * doc/TODO: Remove completed items: snip * -Make LENGTH() of CHAR() not count trailing spaces If I understand correctly, this will lead to the following situation: CHAR_LENGTH('ABCD') == CHAR_LENGTH('ABCD ') == 4 This will definitely break some of our applications. Just want to be sure if this LENGTH() behaviour _will_ appear on the next version of Postgres. If true, can we somehow revert to the current LENGTH() behaviour? Can someone, please, clarify this issue? |
#3
| |||
| |||
|
|
If I understand correctly, this will lead to the following situation: CHAR_LENGTH('ABCD') == CHAR_LENGTH('ABCD ') == 4 This will definitely break some of our applications. |
#4
| |||
| |||
|
|
If you think trailing spaces are semantically significant, you should be using varchar or text fields to store them. In CHAR(n) fields they are not significant, and we're doing our best to make that interpretation consistent across all operations. snip |
![]() |
| Thread Tools | |
| Display Modes | |
| |