String Concatenation

Поиск
Список
Период
Сортировка
От Luiz K. Matsumura
Тема String Concatenation
Дата
Msg-id 002301c470ce$2f15d3b0$1600a8c0@NOTELUIZ
обсуждение исходный текст
Ответы Re: String Concatenation  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
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 по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: unique ID
Следующее
От: Betsy Barker
Дата:
Сообщение: ERROR: pg_class_aclcheck: relation (OID) not found with SELECT INTO variable