Re: UPDATE pg_catalog.pg_class as NO Superuser??

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: UPDATE pg_catalog.pg_class as NO Superuser??
Date: 2007-09-13 09:35:06
Message-ID: 20070913093506.GC2850@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

am Thu, dem 13.09.2007, um 11:25:39 +0200 mailte Kai Behncke folgendes:
> But always if I sent as user xy the
> "UPDATE pg_catalog.pg_class SET reltriggers = 0;"-command I get:
>
> "SQL error:
>
> ERROR: permission denied for relation pg_class"
>
> Why is that? MUST I be a superuser for that?

Write a function with SECURITY DEFINER for that.

*untested*

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2007-09-13 10:25:51 Re: UPDATE pg_catalog.pg_class as NO Superuser??
Previous Message Kai Behncke 2007-09-13 09:25:39 UPDATE pg_catalog.pg_class as NO Superuser??