On 2019-Dec-04, Alvaro Herrera wrote:
>
> > (Maybe do strnlen(maxlen), then count strnlen(1) starting at that point
> > -- so if that returns >=1, print the "..."?)
>
> So I found that I can make the code more reasonable with this simple
> coding,
With strndup.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services