2015-06-21 19 views
5


Ho bisogno di cambiare proprietario del tavolo.
Ho creato tabella:
ERRORE: deve essere membro del ruolo "" PostgreSQL

CREATE TABLE example (some columns); 

Poi ho provato a cambiare proprietario:

ALTER TABLE database.expample OWNER TO "secondary"; 

e li ho ottenuto questo errore:

ERROR: must be member of role "secondary" 

Qualcuno può aiutarmi?
Grazie in anticipo.

+0

Eri il login come 'postgres'? –

risposta

4

Vedere questo dalla documentazione PostgreSQL:

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

Versione breve: non è possibile "distribuire" le tabelle, è necessario essere membri del ruolo di destinazione. –

Problemi correlati