Re: Permission denied when inserting - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Permission denied when inserting
Date
Msg-id 201102280738.40122.adrian.klaver@gmail.com
Whole thread Raw
In response to Permission denied when inserting  (Borek Lupomesky <borek@lupomesky.cz>)
List pgsql-general
On Monday, February 28, 2011 6:37:51 am Borek Lupomesky wrote:
> Hello,
>
>     I have a database app that worked fine until we reinstalled the
> server with the related DB dump and restore. Most of the stuff works
> fine after the reinstall, but one particular insert gives very cryptic
> (for me) message:
>
> spam=> INSERT INTO permout ( site, cp, owner, descr, creat_who ) VALUES
> ( 'vin', '3035.1', 'borelupo', 'test', 'borelupo' );
> ERROR:  permission denied for relation out2cp
> CONTEXT:  SQL statement "SELECT 1 FROM ONLY "public"."out2cp" x WHERE
> "site"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text AND
> "cp"::pg_catalog.text OPERATOR(pg_catalog.=) $2::pg_catalog.text FOR
> SHARE OF x"
>
>     Note, that I am inserting into table "permout", but the message is
> about permission for "out2cp". Any idea what went wrong? When I was
> doing the dump I forgot to dump all the permissions as well so I had to
> restore them manually and possibly something is not right somewhere, but
> the error message given is of no help to me. What does the "CONTEXT"
> message actually mean?
>     More information is below (I'm logged in as user 'borelupo').

Just to be clear where you borelupo when you ran the above statement?
Also what do:
SELECT current_user;
SELECT session_user;

show when you are logged in?



--
Adrian Klaver
adrian.klaver@gmail.com

pgsql-general by date:

Previous
From: Vibhor Kumar
Date:
Subject: Re: Permission denied when inserting
Next
From: Tom Lane
Date:
Subject: Re: NullPointerException when making a getCapabilities request