pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
As superuser I still can't update a row in one table
4+ messages / 2 participants
[nested] [flat]

* As superuser I still can't update a row in one table
@ 2017-04-24 15:02  John Scalia <jayknowsunix@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: John Scalia @ 2017-04-24 15:02 UTC (permalink / raw)
  To: pgsql-admin

Good morning all,

I have a postgresql database used by redhat's spacewalk system that we've
been upgrading. The database's schema-upgrade script failed during our
attempt and I'm trying to clean up. The script errored on the very last
function it tries,and that one invokes another function which is the actual
problem. I altered this function, and got it to write values to it's table,
but they're the wrong values. So now, I'm trying to just run some simple
updates on the table and this is failing.

I'm logged into the database as a Superuser. Here's the sequence from psql:

rhnschema=# \du s45198
           List of roles
 Role name | Attributes | Member of
-----------+------------+-----------
 s45198    | Superuser  | {}

rhnschema=# grant all on schema public to s45198;
GRANT
rhnschema=# grant all on all tables in schema public to s45198;
GRANT
rhnschema=# grant all on table public.rhnpackageevr to s45198;
GRANT
rhnschema=# update rhnpackageevr set epoch = null where id = 19263;
ERROR:  Permission denied: UPDATE is not allowed on rhnpackageevr

The grants I tried to add should have been unnecessary, but how can I, as a
Superuser, still be denied the ability to update a table?
--
Jay

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: As superuser I still can't update a row in one table
@ 2017-04-24 15:13  David G. Johnston <david.g.johnston@gmail.com>
  parent: John Scalia <jayknowsunix@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: David G. Johnston @ 2017-04-24 15:13 UTC (permalink / raw)
  To: John Scalia <jayknowsunix@gmail.com>; +Cc: pgsql-admin

On Mon, Apr 24, 2017 at 8:02 AM, John Scalia <jayknowsunix@gmail.com> wrote:

> ERROR:  Permission denied: UPDATE is not allowed on rhnpackageevr
>
>
​That doesn't look like a system generated message (and grep on the source
tree turns up no results) - which means you should be looking for a trigger
that is blocking you.

David J.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: As superuser I still can't update a row in one table
@ 2017-04-24 15:21  John Scalia <jayknowsunix@gmail.com>
  parent: David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: John Scalia @ 2017-04-24 15:21 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-admin

Ah,, I hadn't considered a trigger that could be blocking it. I'll look for
it.

On Mon, Apr 24, 2017 at 11:13 AM, David G. Johnston <
david.g.johnston@gmail.com> wrote:

> On Mon, Apr 24, 2017 at 8:02 AM, John Scalia <jayknowsunix@gmail.com>
> wrote:
>
>> ERROR:  Permission denied: UPDATE is not allowed on rhnpackageevr
>>
>>
> ​That doesn't look like a system generated message (and grep on the source
> tree turns up no results) - which means you should be looking for a trigger
> that is blocking you.
>
> David J.
>
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: As superuser I still can't update a row in one table
@ 2017-04-24 15:41  John Scalia <jayknowsunix@gmail.com>
  parent: John Scalia <jayknowsunix@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: John Scalia @ 2017-04-24 15:41 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-admin

Thanks for that pointer David. There was, indeed, a trigger on the table
which called a function raising an exception. I just have never seen that
prior to this database.

On Mon, Apr 24, 2017 at 11:21 AM, John Scalia <jayknowsunix@gmail.com>
wrote:

> Ah,, I hadn't considered a trigger that could be blocking it. I'll look
> for it.
>
> On Mon, Apr 24, 2017 at 11:13 AM, David G. Johnston <
> david.g.johnston@gmail.com> wrote:
>
>> On Mon, Apr 24, 2017 at 8:02 AM, John Scalia <jayknowsunix@gmail.com>
>> wrote:
>>
>>> ERROR:  Permission denied: UPDATE is not allowed on rhnpackageevr
>>>
>>>
>> ​That doesn't look like a system generated message (and grep on the
>> source tree turns up no results) - which means you should be looking for a
>> trigger that is blocking you.
>>
>> David J.
>>
>>
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2017-04-24 15:41 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-04-24 15:02 As superuser I still can't update a row in one table John Scalia <jayknowsunix@gmail.com>
2017-04-24 15:13 ` David G. Johnston <david.g.johnston@gmail.com>
2017-04-24 15:21   ` John Scalia <jayknowsunix@gmail.com>
2017-04-24 15:41     ` John Scalia <jayknowsunix@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox