Web pgadmin.org
 Home 
 ·  ·  ·  ·  ·  ·  · 
Strip leading whitespace from table and column comments?

Strip leading whitespace from table and column comments?



Hello,

I'm using OpenACS (http://www.openacs.org), which defines comments on tables and columns as follows:


comment on table parties is '
 Party is the supertype of person and organization. It exists because
 many other types of object can have relationships to parties.
';

comment on column parties.url is '
 We store url here so that we can always make party names hyperlinks
 without joining to any other table.
';


Note the new line after the first quote in each of the above examples. This is done for readability in the sql scripts that define the comments. The result in PGAdmin, however, is that the comments are illegible; only the top half of each character is displayed, as the newline eats most of the comment display space.

One solution is the old
"Doctor, it hurts when I do this."
"Well, don't do that!"
answer: re-format all comments in sql scripts to not include leading whitespace. If it were just my own code I'd do this, but this is a large, well-established open-source project and code like this is sprinkled throughout. There are probably other projects that define comments in a similar way.

I wonder if you'd consider stripping leading whitespace from all comments before displaying them in PgAdmin?

Thanks for writing such a great tool!
Frank



Home | Main Index | Thread Index

top