"scott.marlowe" <[EMAIL PROTECTED]> writes:
> But then this:
> select 'x'||' '||'x'
> should produce xx, but it produces x x.

No, because the imputed type of those literals is text.  You'd have to
cast the middle guy to char(n) explicitly to make its trailing spaces go
away when it's reconverted to text.

The real issue here is that trailing spaces in char(n) are semantically
insignificant according to the SQL spec.  The spec is pretty vague about
which operations should actually honor that insignificance --- it's
clear that comparisons should, less clear about other things.  I think
the 7.4 behavior is more consistent than what we had before, but I'm
willing to be persuaded to change it again if someone can give an
alternate definition that's more workable than this one.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

Reply via email to