Re: [HACKERS] Inconsistent syntax in GRANT

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, josh(at)agliodbs(dot)com
Subject: Re: [HACKERS] Inconsistent syntax in GRANT
Date: 2006-01-06 20:38:00
Message-ID: 200601062038.k06Kc0Q09011@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Bruce Momjian wrote:
> > I'm not sure offhand what keywords we'd want to use, but now is the time
> > to look at it, *before* it becomes set in stone that GRANT ON SEQUENCE
> > is just another spelling of GRANT ON TABLE.
>
> Sequences do not support INSERT, UPDATE, or DELETE, but we overload
> UPDATE to control nextval()/setval(), so I just allowed SELECT and
> UPDATE. I am not sure it makes any sense to allow rules, references,
> and triggers on sequences. However, using ALL or TABLE keywords you can
> define those permissions to a sequence.

Here is an updated patch. The standard doesn't have GRANT VIEW so I
didn't implement that.

One tricky issue I realized is that we should dump out GRANT SEQUENCE,
if possible. I have added code to check in pg_dump and use GRANT
SEQUENCE if only SELECT, UPDATE, or ALL are used.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 12.4 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2006-01-06 21:13:04 Re: Improving N-Distinct estimation by ANALYZE
Previous Message Bruce Momjian 2006-01-06 20:34:38 Re: [HACKERS] Inconsistent syntax in GRANT

Browse pgsql-patches by date

  From Date Subject
Next Message Marko Kreen 2006-01-06 21:29:10 Re: [HACKERS] Inconsistent syntax in GRANT
Previous Message Bruce Momjian 2006-01-06 20:34:38 Re: [HACKERS] Inconsistent syntax in GRANT