Re: serial- sequence priveleges

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: salah jubeh <s_jubeh(at)yahoo(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: serial- sequence priveleges
Date: 2012-03-16 15:20:25
Message-ID: 4F635A39.60701@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 03/16/2012 08:00 AM, salah jubeh wrote:
> Hello Adrian,
>
> Sorry, I was not clear.
>
> what I meant is that.
> GRANT INSERT, UPDATE ON tablenaem TO USER; -- leads to GRANT ALL ON
> TABLE tablename_colname_seq TO USER

CCing the list.
Still not following.
What version of Postgres are you using?

Using 9.0.7 here I get:

test=> CREATE TABLE ser_test(id serial);

public | ser_test | table | aklaver
public | ser_test_id_seq | sequence | aklaver

test=> \dp ser_test
Access privileges
Schema | Name | Type | Access privileges | Column access privileges
--------+----------+-------+-------------------+--------------------------
public | ser_test | table | |
(1 row)

test=> \dp ser_test_id_seq
Access privileges
Schema | Name | Type | Access privileges | Column
access privileges
--------+-----------------+----------+-------------------+--------------------------
public | ser_test_id_seq | sequence |

GRANT INSERT, UPDATE ON table ser_test to sales;
GRANT

test=> \dp ser_test
Access privileges
Schema | Name | Type | Access privileges | Column access
privileges
--------+----------+-------+-------------------------+--------------------------
public | ser_test | table | aklaver=arwdDxt/aklaver+|
| | | sales=aw/aklaver |

test=> \dp ser_test_id_seq
Access privileges
Schema | Name | Type | Access privileges | Column
access privileges
--------+-----------------+----------+-------------------+--------------------------
public | ser_test_id_seq | sequence | |

>
> Regards
>

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2012-03-16 15:35:53 Re: serial- sequence priveleges
Previous Message Albe Laurenz 2012-03-16 15:09:02 Re: how to measure wal_buffer usage