X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 4DF619FB3C4 for ; Mon, 21 Aug 2006 21:06:46 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 27319-07 for ; Mon, 21 Aug 2006 21:06:38 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id 41D869FB2A8 for ; Mon, 21 Aug 2006 20:46:20 -0300 (ADT) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Mon, 21 Aug 2006 23:46:18 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 21 Aug 2006 18:46:18 -0500 Subject: Re: Permission denied for sequece... From: Scott Marlowe To: Jon Horsman Cc: pgsql-jdbc@postgresql.org In-Reply-To: <4f4c2a010608211527t702939e1i174729175d9bed73@mail.gmail.com> References: <4f4c2a010608211203j6591249cifc9c0a793183aee@mail.gmail.com> <1156193701.1090.13.camel@state.g2switchworks.com> <4f4c2a010608211527t702939e1i174729175d9bed73@mail.gmail.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1156203978.1090.121.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 21 Aug 2006 18:46:18 -0500 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.087 tagged_above=0 required=5 tests=AWL, SPF_PASS, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200608/93 X-Sequence-Number: 15620 On Mon, 2006-08-21 at 17:27, Jon Horsman wrote: > > Column | Type | Modifiers > > --------+---------+------------------------------------------------------ > > id | integer | not null default nextval('public.real_id_seq'::text) > > > > Note that my table, real, has a sequence named read_id_seq. You need to > > grant all on that as well... > > That did it. Thanks a lot. I _never_ would have guessed that and > don't recall seeing it in the docs, perhaps i missed it. I do think it's in the docs, but I'm not prepared to bet on it. :) It is a rather inobvious thing though. > While on the topic. Is there one blanket command that can be run to > grant the user permissions to do everything to the db, without making > that user the owner or a superuser? No, there is no single statement. But there is pl/pgsql. If you search the archives there are examples of some fairly simple pl/pgsql scripts that do just that. There might be provisions for such a built in in 8.2, due out soon. I haven't kept up on new pgsql development since taking a rather busy job working on 7.4 machines. I'm really hoping to get an 8.1/8.2 server up and running for work here as a data warehouse though...