pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Petter Reinholdtsen <pere@hungry.com>
Cc: pgsql-docs@postgresql.org
Subject: Re: Question on comment
Date: Wed, 18 Oct 2000 01:02:57 -0400
Message-ID: <4074.971845377@sss.pgh.pa.us> (raw)
In-Reply-To: <200010180426.MAA06748@localhost.localdomain>
References: <200010180426.MAA06748@localhost.localdomain>

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



view thread (4+ messages)

Message-ID: <4074.971845377@sss.pgh.pa.us>
Permalink:  ../4074.971845377@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4074.971845377@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pere@hungry.com
  Subject: Re: Question on comment
  In-Reply-To: <4074.971845377@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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