Search Postgresql Archives

Re: problem inserting with sequence

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you all for your help. I got it working, once.

Right after I made the change and tested it,
everything worked perfect. Then I had a freak nose
bleed- (This has to be my 3rd nose bleed in my life
ever).  I frantically starting closing windows and
shells. While in my frantic state, I deleted my php
script I had spent about 30+ hours working on.  I
don't back anything up on my test server so it's gone
forever now. My stupidity for not backing up the test
server, so my loss- lesson learned and will not make
again.

....but it did work one time.

thank you again for all the help.

--- Michael Fuhr <mike@xxxxxxxx> wrote:

> On Thu, Jul 28, 2005 at 07:04:54AM -0700, germ germ
> wrote:
> > This is the error: 2005-07-28 08:51:08 ERROR: 
> > permission denied for sequence
> requests_req_num_seq
> > 
> > I've tried these grants, but no luck:
> > GRANT ALL ON FUNCTION nextval(integer) TO wwwrun,
> > postgres;
> > GRANT ALL ON FUNCTION
> nextval('requests_req_num_seq')
> > TO wwwrun, postgres;
> > GRANT ALL ON FUNCTION nextval() TO wwwrun,
> postgres;
> 
> It's not the nextval() function itself that needs
> permission, it's
> the sequence.  Try this:
> 
> GRANT UPDATE, SELECT ON requests_req_num_seq TO
> wwwrun;
> 
> Granting update on a sequence allows the use of
> nextval() and
> setval() on that sequence; granting select allows
> currval().
> 
>
http://www.postgresql.org/docs/7.4/static/sql-grant.html
> 
> -- 
> Michael Fuhr
> http://www.fuhr.org/~mfuhr/
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux