pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Question on comment
4+ messages / 2 participants
[nested] [flat]

* Question on comment
@ 2000-10-18 03:53 Petter Reinholdtsen <pere@hungry.com>
  2000-10-18 04:18 ` Re: Question on comment Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Petter Reinholdtsen @ 2000-10-18 03:53 UTC (permalink / raw)
  To: pgsql-docs


I note from <URL:http://www.postgresql.org/docs/user/sql-comment.htm;
that 'comment on' is now implemented in PostgreSQL.  The documentation
do not specify when this statement became available.  I'm currently
using v6.5.3 and it is not available there.  I suggest adding
information in the documentation about when (ie. which version) a new
statement was implemented.  Do I have to move to 7.x to get this
feature?

The documentation do not mention any tools for extracting these
comments into text, HTML or any other format.  Do these exist?  Is it
possible to extract these comments using some SQL query?
-- 
##>  Petter Reinholdtsen  <##  |  pere@td.org.uit.no



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Question on comment
  2000-10-18 03:53 Question on comment Petter Reinholdtsen <pere@hungry.com>
@ 2000-10-18 04:18 ` Tom Lane <tgl@sss.pgh.pa.us>
  2000-10-18 04:26   ` Re: Question on comment Petter Reinholdtsen <pere@hungry.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2000-10-18 04:18 UTC (permalink / raw)
  To: Petter Reinholdtsen <pere@hungry.com>; +Cc: pgsql-docs

IIRC, the COMMENT command was added in 7.0.  But it's just a user
interface to the pg_description table, which has existed for awhile.
pg_description is the thing to look at if you want to manipulate
comments directly.  Basically it maps OIDs to comments...

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Question on comment
  2000-10-18 03:53 Question on comment Petter Reinholdtsen <pere@hungry.com>
  2000-10-18 04:18 ` Re: Question on comment Tom Lane <tgl@sss.pgh.pa.us>
@ 2000-10-18 04:26   ` Petter Reinholdtsen <pere@hungry.com>
  2000-10-18 05:02     ` Re: Question on comment Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Petter Reinholdtsen @ 2000-10-18 04:26 UTC (permalink / raw)
  To: pgsql-docs


> IIRC, the COMMENT command was added in 7.0.  But it's just a user
> interface to the pg_description table, which has existed for awhile.
> pg_description is the thing to look at if you want to manipulate
> comments directly.  Basically it maps OIDs to comments...

Hm, OK.  How are the access rights to this table when 'comment on' is
used?

I remember trying earlier to use this table to store comments, but
discovered each user had to have write access, even to add comments on
their own tables.  Is this problem fixed?
-- 
##>  Petter Reinholdtsen  <##  |  pere@td.org.uit.no



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Question on comment
  2000-10-18 03:53 Question on comment Petter Reinholdtsen <pere@hungry.com>
  2000-10-18 04:18 ` Re: Question on comment Tom Lane <tgl@sss.pgh.pa.us>
  2000-10-18 04:26   ` Re: Question on comment Petter Reinholdtsen <pere@hungry.com>
@ 2000-10-18 05:02     ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2000-10-18 05:02 UTC (permalink / raw)
  To: Petter Reinholdtsen <pere@hungry.com>; +Cc: pgsql-docs

Petter Reinholdtsen <pere@hungry.com> writes:
> Hm, OK.  How are the access rights to this table when 'comment on' is
> used?

Use the source, Luke ... a quick scan of command/comment.c shows that it
allows the owner of an object to comment on that object, and no one else.
Access rights to pg_description itself don't matter.

The general practice in Postgres is that system tables are accessible
read-only to everyone, but are writable only via specialized commands
(like COMMENT ON for pg_description).  The database superuser is not
so restricted, and can shoot himself in the foot with abandon ;-)

> I remember trying earlier to use this table to store comments, but
> discovered each user had to have write access, even to add comments on
> their own tables.  Is this problem fixed?

An explicit "INSERT INTO pg_description" would be treated that way.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2000-10-18 05:02 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-10-18 03:53 Question on comment Petter Reinholdtsen <pere@hungry.com>
2000-10-18 04:18 ` Tom Lane <tgl@sss.pgh.pa.us>
2000-10-18 04:26   ` Petter Reinholdtsen <pere@hungry.com>
2000-10-18 05:02     ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox