Strip leading whitespace from table and column comments?

From: Frank Myhr <fmyhr(at)fhmtech(dot)com>
To: pgadmin-support(at)postgresql(dot)org
Subject: Strip leading whitespace from table and column comments?
Date: 2004-09-29 17:59:06
Message-ID: 415AF7EA.6090007@fhmtech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

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

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Stuart 2004-10-01 15:09:53 Errors trying to run pgadmin3 1.2.0 beta1
Previous Message Raphaël Enrici 2004-09-27 19:05:23 pgAdmin III v1.2.0 Beta2 released