Re: Significant trailing spaces

Поиск
Список
Период
Сортировка
От mike g
Тема Re: Significant trailing spaces
Дата
Msg-id 1091504845.16772.23.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Significant trailing spaces  (Steve Tucknott <steve@retsol.co.uk>)
Ответы Re: Significant trailing spaces  (Steve Tucknott <steve@retsol.co.uk>)
Список 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

В списке pgsql-novice по дате отправления:

Предыдущее
От: mike g
Дата:
Сообщение: Re: error in compiling the function -- need help !!!
Следующее
От: Steve Tucknott
Дата:
Сообщение: Re: Significant trailing spaces