Should there be a charcat? - Mailing list pgsql-hackers

From Jim C. Nasby
Subject Should there be a charcat?
Date
Msg-id 20061006192826.GV72517@nasby.net
Whole thread Raw
Responses Re: Should there be a charcat?
List pgsql-hackers
Column |     Type      | Modifiers
--------+---------------+-----------c      | character(20) |

decibel=# select c, c || ('x'::char) from c;         c           | ?column?
----------------------+----------x                    | xx

I would think that c || 'x' would result in 'x                    x', but it doesn't because the only text
concatenationfunction we have is textcat(text,
 
text). As soon as you cast a char to text, you lose all the trailing spaces.

Is this what the spec says should happen?
-- 
Jim Nasby                                            jim@nasby.net
EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)


pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: Backbranch releases
Next
From: Tom Lane
Date:
Subject: Re: Should there be a charcat?