How to concat strings so that trailing spaces remain

Поиск
Список
Период
Сортировка
От Andrus
Тема How to concat strings so that trailing spaces remain
Дата
Msg-id e0h85d$u49$1@news.hub.org
обсуждение исходный текст
Ответы Re: How to concat strings so that trailing spaces remain  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I have where clause where all fields are CHAR(10) type and may have trailing
spaces.

SELECT ...

FROM r1, r2

WHERE r1.c1 || r1.c2 || r1.c3 >= r2.c1 || r2.c2 || r2.c3;



This WHERE clause produces wrong result since || operator removes trailing
spaces.

Correct result is produced if || operator does not remove trailing spaces.

How to concat strings in this expression so that trailing spaces are
significiant or how to re-write this join condition so that trailing spaces
are used for comparison?

Andrus.



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

Предыдущее
От: "Christopher Condit"
Дата:
Сообщение: Re: pgsql and streams
Следующее
От: Don Y
Дата:
Сообщение: User defined data type