From: | "liuyuanyuan" <liuyuanyuangogo(at)gmail(dot)com> |
---|---|
To: | "'Guillaume Lelarge'" <guillaume(at)lelarge(dot)info> |
Cc: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | 答复: [ADMIN] sql to grant privilege on sequence |
Date: | 2014-07-14 09:31:01 |
Message-ID: | 020f01cf9f46$5fff2ec0$1ffd8c40$@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Thanks Guillaume! Thanks for your reply !
Now that, I got the reason.
I knew GRANT ON TABLE still works for sequence, but I think use GRANT ON SEQUENCE
in pgAdmin3 of newer version maybe much better. Because GRANT ON SEQUENCE is more clear,
and maybe that’s why developers create this syntax especially for sequence.
That’s only a suggestion, looking forward to hearing from you later~~
Regards !
Yours,
Jasmine
发件人: Guillaume Lelarge [mailto:guillaume(at)lelarge(dot)info]
发送时间: 2014年7月14日 16:50
收件人: liuyuanyuan
抄送: pgsql-admin(at)postgresql(dot)org
主题: Re: [ADMIN] sql to grant privilege on sequence
Le 14 juil. 2014 08:20, "liuyuanyuan" <liuyuanyuangogo(at)gmail(dot)com <mailto:liuyuanyuangogo(at)gmail(dot)com> > a écrit :
>
> Hi, Hackers!
>
> I got a question about sequence SQL of pgadmin3 , such as pgAdmin3 of PostgreSQL9.3.
>
> I found when I GRANT privilege on sequence by pgAdmin3 tool, it’s always show me sql like:
>
> GRANT SELECT, UPDATE ON TABLE sequence_name TO ….
>
> Rather than:
>
> GRANT SELECT, UPDATE ON SEQUENCE sequence_name TO ….
>
>
>
> For example:
>
> When I use pgAdmin3 TO create a sequence, I input SEQUENCE NAME – seq1 ,and add privilege SELECT to public,
>
> Then the SQL shows: GRANT .. ON TABLE …
>
>
>
>
>
> I checked the documentation of PostgreSQL 9.3 (see http://www.postgresql.org/docs/9.3/interactive/sql-grant.html)
>
> Then I know the privileges grant on sequence are only a part of that on table.
>
> Then I want to know, why to use GRANT ON TABLE ? why not to use GRANT ON SEQUENCE ?
>
Because that was the way to do it before 8.2 iirc. And it still works. Nevertheless I'll look into it.
From | Date | Subject | |
---|---|---|---|
Next Message | John Scalia | 2014-07-14 13:57:00 | Re: WAL segment management on a standby |
Previous Message | Guillaume Lelarge | 2014-07-14 08:49:48 | Re: sql to grant privilege on sequence |