2015-06-21 8 views
5


Ich muss Besitzer der Tabelle ändern.
I erstellte Tabelle:
FEHLER: muss Mitglied der Rolle sein "" PostgreSQL

CREATE TABLE example (some columns); 

Dann habe ich versucht Besitzer zu ändern:

ALTER TABLE database.expample OWNER TO "secondary"; 

und sie habe ich diesen Fehler:

ERROR: must be member of role "secondary" 

Kann mir jemand helfen?
Vielen Dank im Voraus.

+0

Waren Sie als 'postgres' angemeldet? –

Antwort

4

Sehen Sie diese aus der PostgreSQL-Dokumentation:

http://www.postgresql.org/docs/current/static/sql-altertable.html

You must own the table to use ALTER TABLE. To change the schema of a table, you must also have CREATE privilege on the new schema. To alter the owner, you must also be a direct or indirect member of the new owning role, and that role must have CREATE privilege on the table's schema. (These restrictions enforce that altering the owner doesn't do anything you couldn't do by dropping and recreating the table. However, a superuser can alter ownership of any table anyway.)

+2

Kurzversion: Sie können Tabellen nicht "weggeben", Sie müssen ein Mitglied der Zielrolle sein. –

Verwandte Themen