Обсуждение: Strip leading whitespace from table and column comments?

Поиск
Список
Период
Сортировка

Strip leading whitespace from table and column comments?

От
Frank Myhr
Дата:
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
objectcan 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
toany 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


Re: Strip leading whitespace from table and column

От
Andreas Pflug
Дата:
Frank Myhr wrote:
> Hello,
> 

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

I've put this on the todo list, will be done in 1.3/1.4.

Regards,
Andreas