Re: Trailing spaces in char or varchar fields

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Trailing spaces in char or varchar fields
Дата
Msg-id 25262.978657971@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Trailing spaces in char or varchar fields  ("Huy Do" <huy@travel.com.au>)
Ответы RE: Trailing spaces in char or varchar fields  ("Huy Do" <huy@travel.com.au>)
Re: Trailing spaces in char or varchar fields  ("Anthony E . Greene" <agreene@pobox.com>)
Список pgsql-novice
"Huy Do" <huy@travel.com.au> writes:
> Is there a way to get postgres to keep the trailing spaces
> in a field. I have an existing database which I am porting
> to postgresql. This database allows fields to have trailing
> spaces and many key fields have trailing spaces to distinguish
> uniqueness (i know this is bad but it's legacy stuff).
> When I dump my database and try to copy it into postgresql, it
> complains about duplicate keys because postgres is trimming the
> spaces.

Postgres does not trim trailing spaces.  I suspect that that behavior
is coming from whatever tool you used to transfer the data.

            regards, tom lane

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

Предыдущее
От: Thomas SMETS
Дата:
Сообщение: Debugging ?
Следующее
От: "Huy Do"
Дата:
Сообщение: RE: Trailing spaces in char or varchar fields