Re: Permission denied for sequece...

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Jon Horsman <horshaq(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Permission denied for sequece...
Date: 2006-08-21 23:46:18
Message-ID: 1156203978.1090.121.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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...

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Grégory Chazalon 2006-08-22 10:39:56 [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails to execute (SimpleQuery splitting invalid)
Previous Message Jon Horsman 2006-08-21 22:27:21 Re: Permission denied for sequece...