From: | mike g <mike(at)thegodshalls(dot)com> |
---|---|
To: | Steve Tucknott <steve(at)retsol(dot)co(dot)uk> |
Cc: | PostGre <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Significant trailing spaces |
Date: | 2004-08-03 03:47:25 |
Message-ID: | 1091504845.16772.23.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Tucknott | 2004-08-03 06:43:58 | Re: Significant trailing spaces |
Previous Message | mike g | 2004-08-03 03:31:41 | Re: error in compiling the function -- need help !!! |