Re: Concat truncates at 257 characters

From: David Johnston <polobo(at)yahoo(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Concat truncates at 257 characters
Date: 2013-11-25 23:31:11
Message-ID: 1385422271248-5780248.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

More details please.

> The problem is that the concat and || are truncating the result.

No, that is not the case:

select length(cast( rpad('', 200, 'A')::text || rpad('', 200, 'B')::text as
text )) -- output -> 400

SELECT length(repeat('a', 50) || repeat('b', 200) || repeat('c', 100)) --
output -> 350

> My automated database unit tests compare the actual result to the expected
> result then provides a pass or fail status.

So some client-side interface is where the problem resides. It is trying to
output more user-friendly content for extra-long strings.

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Concat-truncates-at-257-characters-tp5780244p5780248.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Patrick Lademan 2013-11-25 23:53:18 Re: Concat truncates at 257 characters
Previous Message John R Pierce 2013-11-25 23:17:30 Re: Concat truncates at 257 characters