Re: Grant select on view
От | thiemo |
---|---|
Тема | Re: Grant select on view |
Дата | |
Msg-id | A147FE42-4549-11D6-BA58-000A27D62F9E@gmx.ch обсуждение исходный текст |
Ответ на | Re: Grant select on view (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Grant select on view
|
Список | pgsql-novice |
<excerpt>A complete example; we can't possibly guess what you did wrong with only such sketchy details. It would also be useful to know which version of PG you are using. </excerpt> Oh, sure. A self-compiled 7.2, without any source code modifications. I first instal a sequence: "CREATE SEQUENCE seq INCREMENT 1 MINVALUE 1 START 1 CACHE 1" then a table: "CREATE TABLE base ( att1 type(x) default nextval(seq), ... attn type(x) )" a view: "CREATE VIEW vie AS SELECT att2, ..., attn_1 FROM base WHERE attn = CURRENT_USER::varchar" a user: "CREATE USER usr PASSWORD 'somewhat' NOCREATEDB NOCREATEUSER" and finally the grant: "GRANT SELECT ON vie TO usr" Hope this helps. Thx Thiemo <fontfamily><param>Helvetica</param> -- Thiemo Kellner Tösstalstrasse 146 CH-8400 Winterthur </fontfamily>> A complete example; we can't possibly guess what you did wrong with > only such sketchy details. It would also be useful to know which > version of PG you are using. Oh, sure. A self-compiled 7.2, without any source code modifications. I first instal a sequence: "CREATE SEQUENCE seq INCREMENT 1 MINVALUE 1 START 1 CACHE 1" then a table: "CREATE TABLE base ( att1 type(x) default nextval(seq), ... attn type(x) )" a view: "CREATE VIEW vie AS SELECT att2, ..., attn_1 FROM base WHERE attn = CURRENT_USER::varchar" a user: "CREATE USER usr PASSWORD 'somewhat' NOCREATEDB NOCREATEUSER" and finally the grant: "GRANT SELECT ON vie TO usr" Hope this helps. Thx Thiemo -- Thiemo Kellner Tösstalstrasse 146 CH-8400 Winterthur
В списке pgsql-novice по дате отправления: