Re: Move table - New schema - Mailing list pgsql-general

From António Rodrigues
Subject Re: Move table - New schema
Date
Msg-id CABOU0iSxwc9WJAQRqP8o0n2qbbLLp9ynz4h=85XLxv4hMU_gaw@mail.gmail.com
Whole thread Raw
In response to Re: Move table - New schema  (Adrian Klaver <adrian.klaver@gmail.com>)
List pgsql-general
You were both right. It was a problem with permissions.
Thank you,
António

On Tue, Sep 18, 2012 at 2:37 PM, Adrian Klaver <adrian.klaver@gmail.com> wrote:
On 09/18/2012 03:48 AM, António Rodrigues wrote:
Hi list,

(newbie question)

I'm trying to move a set of tables between schemas.

Tried:

ALTER TABLE tablename
     SET SCHEMA schemaname

It gives me error: "schema schemaname does not exist" (it does)

http://www.postgresql.org/docs/9.0/interactive/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"

Are you doing the above as the owner of the table and does the owner have CREATE privileges on the new schema?



Any help please.
Thanks,
António


--
Adrian Klaver
adrian.klaver@gmail.com

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Index creation takes more time?
Next
From: Chris Angelico
Date:
Subject: Re: RFE: Column aliases in WHERE clauses