Thread: permission problems

permission problems

From
Ron Ellingson
Date:
I am having a problem adding a row to a postgresql table with a sequence
as a primary key using pg_query.  I receive an error, "permission denied
for sequence mytable_tid_seq".  I have set the permissions for the user
from all which did not work to insert, update and select which did not
work.  Can you  help.  Thanks

            Ron Ellingson
            rellingson@satshot.com


Re: permission problems

From
Heather Johnson
Date:
Did you grant the relevant permissions on just the table, or on both the
sequence and the table? You'll need to do both.

Heather Johnson
Senior Database Programmer
New York Post

Ron Ellingson wrote:
> I am having a problem adding a row to a postgresql table with a sequence
> as a primary key using pg_query.  I receive an error, "permission denied
> for sequence mytable_tid_seq".  I have set the permissions for the user
> from all which did not work to insert, update and select which did not
> work.  Can you  help.  Thanks
>
>             Ron Ellingson
>             rellingson@satshot.com
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Re: permission problems

From
Martín Marqués
Date:
El Mié 23 Feb 2005 17:24, Ron Ellingson escribió:
> I am having a problem adding a row to a postgresql table with a sequence
> as a primary key using pg_query.  I receive an error, "permission denied
> for sequence mytable_tid_seq".  I have set the permissions for the user
> from all which did not work to insert, update and select which did not
> work.  Can you  help.  Thanks

Did you check the permissions of the sequence?

--
 17:40:04 up 164 days,  7:34,  3 users,  load average: 1.43, 1.36, 0.97
-----------------------------------------------------------------
Martín Marqués        | select 'mmarques' || '@' || 'unl.edu.ar'
Centro de Telematica  |  DBA, Programador, Administrador
             Universidad Nacional
                  del Litoral
-----------------------------------------------------------------

Re: permission problems

From
Christopher Kings-Lynne
Date:
> I am having a problem adding a row to a postgresql table with a sequence
> as a primary key using pg_query.  I receive an error, "permission denied
> for sequence mytable_tid_seq".  I have set the permissions for the user
> from all which did not work to insert, update and select which did not
> work.  Can you  help.  Thanks

GRANT SELECT, UPDATE ON sequence mytable_tid_seq TO ...;

Chris