Re: String Concatenation

Поиск
Список
Период
Сортировка
От John Brookes
Тема Re: String Concatenation
Дата
Msg-id 007d01c470d5$13f7ac00$6501a8c0@sccorp.com
обсуждение исходный текст
Ответ на String Concatenation  ("Luiz K. Matsumura" <luiz@planit.com.br>)
Список pgsql-novice
 
----- Original Message -----
Sent: Friday, July 23, 2004 9:00 AM
Subject: [NOVICE] String Concatenation

I want to concatenate 2 fields :
tpmov char(4)  | dsmov char(10)
---------------+----------------
AB             | SOMETHING
 
If I do:
 
SELECT tpmov || dsmov as History ...
 
if the field tpmov has a fixed lenght of char(4) the result
expected (I suppose) may be
 
History
--------------
AB  SOMETHING
 
But Postgres returns
 
History
------------
ABSOMETHING
 
Why this occurs ?
How I can get the first result ( AB__SOMETHING ) ?
 
If I do a select with the literal strings the result is as expected :
 
SELECT 'AB  ' || 'SOMETHING' AS History ;
 
History
--------------
AB  SOMETHING
 
My reasoning is wrong or this is a bug ?
 
 

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

Предыдущее
От: "John Brookes"
Дата:
Сообщение: Re: unique ID
Следующее
От: "bcscomputers"
Дата:
Сообщение: