Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Really annoying comments...

1 view
Skip to first unread message

Rod Taylor

unread,
Apr 19, 2002, 2:02:24 PM4/19/02
to
COMMENT ON DATABASE db IS 'Comment';

Now switch databases. Comment is gone.

Of course, adding the comments to template1 will carry comments
forward (in pg_description) to future DBs. Not fatal, but quite
annoying.

I suppose in order to add a comment field to pg_database it would need
to be toasted or something (ton of work). Any other way to fix this?
--
Rod


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majo...@postgresql.org so that your
message can get through to the mailing list cleanly

Tom Lane

unread,
Apr 19, 2002, 2:54:10 PM4/19/02
to
"Rod Taylor" <r...@zort.ca> writes:
> COMMENT ON DATABASE db IS 'Comment';
> Now switch databases. Comment is gone.

Yeah, it's not very helpful. I'm not sure why we bothered to implement
that in the first place.

> I suppose in order to add a comment field to pg_database it would need
> to be toasted or something (ton of work). Any other way to fix this?

I'm more inclined to rip it out ;-). I don't think it's worth the
trouble. Keeping database comments someplace else than pg_description
is certainly *not* the way to go --- everything that reads them would
have to be tweaked too.

What does need to be added at the moment is COMMENT ON SCHEMA (a/k/a
namespace).

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Dave Page

unread,
Apr 21, 2002, 2:37:43 PM4/21/02
to

> -----Original Message-----
> From: Tom Lane [mailto:t...@sss.pgh.pa.us]
> Sent: 19 April 2002 19:54
> To: Rod Taylor
> Cc: Hackers List
> Subject: Re: Really annoying comments...
>
>
> "Rod Taylor" <r...@zort.ca> writes:
> > COMMENT ON DATABASE db IS 'Comment';
> > Now switch databases. Comment is gone.
>
> Yeah, it's not very helpful. I'm not sure why we bothered to
> implement that in the first place.
>
> > I suppose in order to add a comment field to pg_database it
> would need
> > to be toasted or something (ton of work). Any other way to
> fix this?
>
> I'm more inclined to rip it out ;-).

Eeep! pgAdmin handles comments coming from multiple pg_description tables
and it works very well (IMHO) in the pgAdmin UI. By all means make them work
more sensibly in whatever way seems most appropriate - I'll fix pgAdmin to
handle it, but don't just rip them out please!!

Regards, Dave.

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majo...@postgresql.org)

Tom Lane

unread,
Apr 21, 2002, 2:45:19 PM4/21/02
to
Dave Page <dp...@vale-housing.co.uk> writes:
>> I'm more inclined to rip it out ;-).

> Eeep! pgAdmin handles comments coming from multiple pg_description tables
> and it works very well (IMHO) in the pgAdmin UI. By all means make them work
> more sensibly in whatever way seems most appropriate - I'll fix pgAdmin to
> handle it, but don't just rip them out please!!

Well, it would seem like the only sensible rule would be to allow
COMMENT ON DATABASE only for the *current* database. Then at least
you know which DB to look in.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Dave Page

unread,
Apr 21, 2002, 2:49:34 PM4/21/02
to

> -----Original Message-----
> From: Tom Lane [mailto:t...@sss.pgh.pa.us]

> Sent: 21 April 2002 19:45
> To: Dave Page
> Cc: Rod Taylor; Hackers List
> Subject: Re: [HACKERS] Really annoying comments...
>
>
> Dave Page <dp...@vale-housing.co.uk> writes:
> >> I'm more inclined to rip it out ;-).
>
> > Eeep! pgAdmin handles comments coming from multiple pg_description
> > tables and it works very well (IMHO) in the pgAdmin UI. By
> all means
> > make them work more sensibly in whatever way seems most
> appropriate -
> > I'll fix pgAdmin to handle it, but don't just rip them out please!!
>
> Well, it would seem like the only sensible rule would be to
> allow COMMENT ON DATABASE only for the *current* database.
> Then at least you know which DB to look in.

That wouldn't cause me any pain - in pgAdmin the comment is just a property
of a pgDatabase object - if you modify it, it will always be set through a
connection to that database.

Regards, Dave.

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majo...@postgresql.org

Rod Taylor

unread,
Apr 21, 2002, 4:10:36 PM4/21/02
to
This makes the most sense. One could assume a user who doesn't have
access to a particular database shouldn't know what it's for either.
So making the comments global could be problematic in some cases.

I'll enforce this and send in a patch.
--
Rod


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

0 new messages