Thread: Comments cut off after line break
Hi developers! Hi Dave! Using pgAdmin III v1.6.1 rev: 5709, client Win XP. Host Debian Sarge, PG 8.1.4. In the object browser comments are appended to the columns of a table definition, which is useful. But it looks like those comments are cut off after the first line break. Simple test case: CREATE TABLE test ( a integer -- First line of comment ) WITHOUT OIDS; COMMENT ON COLUMN test.a IS 'First line of comment Second line. Third line of comment.'; psql gives unabbreviated comments: \d+ test Maybe this happens on purpose to shorten lengthy comments. But then again, a better way would probably be to print the first x (200?) characters (substituting spaces for linebreaks) and append ' ...' if there is more. This is not a major problem, but misleading sometimes. Might be easy to fix. I remember similar (graver) problems with line breaks in 1.6 beta, which you fixed. Looks like this one got away. Regards Erwin
Erwin Brandstetter wrote: > Maybe this happens on purpose to shorten lengthy comments. It does. > But then > again, a better way would probably be to print the first x (200?) > characters (substituting spaces for linebreaks) and append ' ...' if > there is more. Chopping at the first line is more flexible as it allows the user some control over what is shown there. I have committed a change to add ... if it truncates at all though. Cheers, Dave
dpage@postgresql.org wrote: > Erwin Brandstetter wrote: > >> Maybe this happens on purpose to shorten lengthy comments. > > It does. > >> But then again, a better way would probably be to print the first x >> (200?) characters (substituting spaces for linebreaks) and append ' >> ...' if there is more. > > Chopping at the first line is more flexible as it allows the user some > control over what is shown there. I have committed a change to add ... > if it truncates at all though. Even better so, I agree. Regards Erwin