I just started using PostgreSQL and have problems in changing the ownwer of a table. I have a database postgis_in_action and a user postgis_in_action. As I worked as postgres user and as well as postgis_in_action user my tables ch01.highways and ch01.highways_staginghave different owners postgres and postgis_in_action. They are in the same schema ch01. I checked the following command in psql as postgres user in my database postgis_in_action:

ALTER TABLE ch01.highways_staging OWNER TO postgis_in_action

Do I have to add or modify something if I want to change the owner for ch01.highways_staging to postgis_in_action?

In psql I don't get any error message and the result of the command is that the ownwer remains postgres.

I'm logged in to my database with user postgres because I wanted to have the priviledge to change the owner of a table/relation.


1 Answer 1


Community wiki answer:

A generic reason that affects those new to psql is forgetting the semicolon at the end of the command, so that it doesn't get executed. Otherwise your command looks good and should do what you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.