Re: Strange Result with char concatenation in query.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Strange Result with char concatenation in query.
Дата
Msg-id 27465.1022534460@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Strange Result with char concatenation in query.  ("mathieu.chappuis@msg-software.com" <mathieu.chappuis@msg-software.com>)
Список pgsql-general
"mathieu.chappuis@msg-software.com" <mathieu.chappuis@msg-software.com> writes:
> test_db=> SELECT '+'||numtst||'+' AS "numtst", '*'||chartst||'-' AS "chartst"  FROM test;
>  numtst | chartst
> --------+------------
> -+2+    | *100/100
> -+4+    | *100/100
> -+5+    | *200/200
> (3 rows)

> As you see the last '-' in the second column is appended to the first column.

I think you have carriage returns in the values of chartst, which would
not be surprising if the original data file had Windows-style newlines
in it.  COPY expects Unix-style newlines.

            regards, tom lane

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

Предыдущее
От: "Naveen Kaul"
Дата:
Сообщение: Help needed.
Следующее
От: Manfred Koizar
Дата:
Сообщение: Re: Strange Result with char concatenation in query.