The only thing I see mentioned in the docs is that prior to 7.2:
insert char( 250 ) into a column of char ( 100 ) would succeed without
generating an error or warning that 150 characters were chopped off.
In 7.2: insert char( 250 ) into a column of char ( 100 ) crashes with an
error.
insert char (250) into a CAST(column as char (100)) succeeds and
silently chops off the last 150 characters.
The 150 characters chopped could be any type of character data (trailing
space etc.).
I am looking at
http://www.postgresql.org/docs/7.4/static/datatype-character.html.
If you are looking at something different please post a link or copy and
paste if it is not long.
Mike
On Mon, 2004-08-02 at 09:08, Steve Tucknott wrote:
> PostGreSql 7.4.3
>
> I noticed that there was a change in the way that 7.4 handled trailing
> spaces in CHAR/VARCHARS,
> so upgraded from 7.2.4,
> I still seem to get the same problem - putting a CHAR(250) variable
> (with trailing spaces) into a VARCHAR(100) gives me a VARCHAR with a
> length 100 - ie padded with spaces. Is this still correct?
>
> Have I misunderstood, and are trailing spaces handled in the same way
> in both 7.2.4 and 7.4.3 (or is there some flag I need to set to get
> the new functionality?)
>
>
> Regards,
>
> Steve Tucknott
>
> ReTSol Ltd
>
> DDI: 01903 828769