Thread: v.1.6.2: issue with truncated column comments.

v.1.6.2: issue with truncated column comments.

From
Erwin Brandstetter
Date:
Hi developers! Hi Dave!

Testing pgAdmin III v1.6.2 rev: 5837, client Win XP. Host Debian Sarge, 
PG 8.1.4.

While having a look at the new release, I think I found an issue with 
truncated column comments. It seemed quite random at first, I guess I 
have figured it out, though:

If the comment includes a windows-style linebreak (CR+LF), the appended 
dots end up in a new line. The generated script is not executable 
without syntax error.
Does not happen with Linx-style linebreak (LF). Not tested with 
Max-style (CR).
Show-case appended.
Sorry I did not report earlier, I did not have access to a windows build 
before release, though.

On a sidenote: appending ' ..' (a blank and 2 or 3 dots) might look 
cleaner than '...' (3 dots, no blank).


Regards
Erwin


-- Table: test

-- DROP TABLE test;

CREATE TABLE test
( a text, -- a b text, -- b... c text -- c
...
)
WITHOUT OIDS;
ALTER TABLE test OWNER TO postgres;
COMMENT ON COLUMN test.a IS 'a';
COMMENT ON COLUMN test.b IS 'b
c linebreak = LF (Linux)';
COMMENT ON COLUMN test.c IS 'c
d linebreak = CR+LF (Windows)';



Re: v.1.6.2: issue with truncated column comments.

From
Dave Page
Date:
Erwin Brandstetter wrote:
> Hi developers! Hi Dave!
> 
> Testing pgAdmin III v1.6.2 rev: 5837, client Win XP. Host Debian Sarge,
> PG 8.1.4.
> 
> While having a look at the new release, I think I found an issue with
> truncated column comments. It seemed quite random at first, I guess I
> have figured it out, though:
> 
> If the comment includes a windows-style linebreak (CR+LF), the appended
> dots end up in a new line. The generated script is not executable
> without syntax error.
> Does not happen with Linx-style linebreak (LF). Not tested with
> Max-style (CR).
> Show-case appended.
> Sorry I did not report earlier, I did not have access to a windows build
> before release, though.

A while after that original fix, I did a similar one for some other
properties in which I wrote a function to do the job, which did check
for \r\n before assuming \n. I thought I updated the comment code to use
it as well but clearly I forgot :-(

Should be OK now though.

> On a sidenote: appending ' ..' (a blank and 2 or 3 dots) might look
> cleaner than '...' (3 dots, no blank).

I prefer '...' to be honest.

Regards, Dave.


Re: v.1.6.2: issue with truncated column comments.

From
"Andy Shellam (Mailing Lists)"
Date:
> I prefer '...' to be honest.
>
>
>   
Personally I prefer a mix of the two suggestions " ..." (space then 
three dots) lol but that's just me :)

-- 
Andy Shellam
NetServe Support Team

the Mail Network
"an alternative in a standardised world"