Обсуждение: Create table command fails with permission denied

Поиск
Список
Период
Сортировка

Create table command fails with permission denied

От
Venkateswara Rao Bondada
Дата:

Hi,

I’m new to PostgreSQL, and currently facing an issue with PostgreSQL 7.4 database. I’m getting the following error when tried to create a table. Please let me know the steps (with queries) that I should take care to resolve this issue.

 

cms=# create table test(id character varying(80));

ERROR:  could not create relation "test": Permission denied

 

Thanks in advance,

Venkat

Re: Create table command fails with permission denied

От
AmitKumar Jain
Дата:


Venkateswara Rao Bondada wrote:

Hi,

I’m new to PostgreSQL, and currently facing an issue with PostgreSQL 7.4 database. I’m getting the following error when tried to create a table. Please let me know the steps (with queries) that I should take care to resolve this issue.

 

cms=# create table test(id character varying(80));

ERROR:  could not create relation "test": Permission denied

 

Thanks in advance,

Venkat



login with postgres user like psql -Upostgres cms   and THEN execute create table statement.

OR
    Refer this  : http://www.postgresql.org/docs/7.4/static/sql-grant.html
--

Regards,

 

Amit Jain
Synechron Technology Pvt. Ltd.

Pune 411 057.
Phone : +91.20.40262000 Ext 2162 | Mobile:+91.9373415075 | Fax: +91.20.30513500
http://www.synechron.com | MailTo: amitjain@synechron.com


Re: Create table command fails with permission denied

От
Venkateswara Rao Bondada
Дата:

Hi,

To add some more details to my question, I'm using postgres account (which is a superuser in the database) to create table. Table creation is working fine in other databases except in this (cms). As postgres user, I granted CREATE, USAGE & ALL privileges to postgres account, still it didn't work.

Please find the snapshots below where it works fine and also where it doesn't work fine. And let me know what rights postgres account is missing to create tables in "cms" database.

 

==========================================

camd=# \c camd postgres

You are now connected to database "camd" as user "postgres".

camd=# create table test(id character varying(80));

CREATE TABLE

camd=# \c cms postgres You are now connected to database "cms" as user "postgres".

cms=# create table test(id character varying(80));

ERROR:  could not create relation "test": Permission denied cms=#

==========================================

 

Thanks,

Venkat

 

 

From: Venkateswara Rao Bondada
Sent: Monday, August 03, 2009 6:26 PM
To: 'pgsql-admin@postgresql.org'
Subject: Create table command fails with permission denied

 

Hi,

I’m new to PostgreSQL, and currently facing an issue with PostgreSQL 7.4 database. I’m getting the following error when tried to create a table. Please let me know the steps (with queries) that I should take care to resolve this issue.

 

cms=# create table test(id character varying(80));

ERROR:  could not create relation "test": Permission denied

 

Thanks in advance,

Venkat