Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id C732964FFFC for ; Fri, 8 Aug 2008 12:28:40 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 10958-05 for ; Fri, 8 Aug 2008 12:28:37 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by postgresql.org (Postfix) with ESMTP id C8D0564FCDE for ; Fri, 8 Aug 2008 12:28:37 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KRTtG-0004Sp-E0 for pgsql-admin@postgresql.org; Fri, 08 Aug 2008 15:28:30 +0000 Received: from gw-sf.securax.net ([89.253.129.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 08 Aug 2008 15:28:30 +0000 Received: from milen by gw-sf.securax.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 08 Aug 2008 15:28:30 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-admin@postgresql.org From: "Milen A. Radev" Subject: Re: Privileges to sequences? Date: Fri, 08 Aug 2008 18:28:21 +0300 Lines: 28 Message-ID: References: <20F7D7F1-4939-4BE3-9116-4C82FE176E07@indiana.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: gw-sf.securax.net User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: <20F7D7F1-4939-4BE3-9116-4C82FE176E07@indiana.edu> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200808/35 X-Sequence-Number: 29880 Carol Walter написа: > Hello, > > I've had trouble several times when granting permissions on tables when > I had not also granted permission to the sequence. The sequences may > only have select, insert, and usage privileges. I can guess that when I > grant select privileges on a table, I need to grant select privileges to > the sequence and I can guess that if I grant insert privileges to a > table I need to grant the insert privilege to the sequence. I don't > know when to usage and I don't know what privileges, if any, I need to > grant to the sequence if I'm going to give delete, update, or references > privileges on the tables. [...] Reading the documentation: - if you only grant SELECT on the table in question - no privileges are needed for the linked sequence; - for normal usage (selects, inserts, updates, deletes) - the USAGE privilege seems quite handy; - when you need to grant full access to a sequence (rare case) - both SELECT and UPDATE; - UPDATE, DELETE and REFERENCES privileges on the table(s) are not related to the privileges of the corresponding sequence; -- Milen A. Radev