Re: Concat truncates at 257 characters - Mailing list pgsql-bugs

From David Johnston
Subject Re: Concat truncates at 257 characters
Date
Msg-id 1385422271248-5780248.post@n5.nabble.com
Whole thread Raw
In response to Concat truncates at 257 characters  (Patrick Lademan <mjfrog14@gmail.com>)
List 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.

pgsql-bugs by date:

Previous
From: John R Pierce
Date:
Subject: Re: Concat truncates at 257 characters
Next
From: Patrick Lademan
Date:
Subject: Re: Concat truncates at 257 characters