Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 2D23E633EA0 for ; Tue, 4 Aug 2009 05:11:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 63170-09 for ; Tue, 4 Aug 2009 08:11:35 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from KECGATE03.infosys.com (Kecgate03.infosys.com [122.98.10.31]) by mail.postgresql.org (Postfix) with ESMTP id DBB7B633AB9 for ; Tue, 4 Aug 2009 05:11:34 -0300 (ADT) X-TM-IMSS-Message-ID: Received: from blrkechub02.ad.infosys.com ([10.66.236.42]) by KECGATE03.infosys.com ([122.98.10.31]) with ESMTP (TREND IMSS SMTP Service 7.0) id fd47fe25001ac644 ; Tue, 4 Aug 2009 13:39:24 +0530 Received: from BLRKECMBX01.ad.infosys.com ([10.66.236.21]) by blrkechub02.ad.infosys.com ([10.66.236.42]) with mapi; Tue, 4 Aug 2009 13:41:31 +0530 From: Venkateswara Rao Bondada To: Rob Sargent CC: "pgsql-sql@postgresql.org" Date: Tue, 4 Aug 2009 13:41:29 +0530 Subject: Re: Create table command fails with permission denied Thread-Topic: [SQL] Create table command fails with permission denied Thread-Index: AcoUhiy6L2J0k/fHROyV05iNeVXegQASHenA Message-ID: <22640DE58AF78445BA8AB69FF76F07321AA2C2100A@BLRKECMBX01.ad.infosys.com> References: <22640DE58AF78445BA8AB69FF76F07321AA2C20BAB@BLRKECMBX01.ad.infosys.com> <4A775E91.4090608@gmail.com> In-Reply-To: <4A775E91.4090608@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200908/14 X-Sequence-Number: 32923 Hi Rob, 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. A= s postgres user, I granted CREATE, USAGE & ALL privileges to postgres accou= nt, 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 cr= eate tables in "cms" database. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D camd=3D# \c camd postgres You are now connected to database "camd" as user "postgres". camd=3D# create table test(id character varying(80)); CREATE TABLE camd=3D# \c cms postgres You are now connected to database "cms" as user "postgres". cms=3D# create table test(id character varying(80)); ERROR: could not create relation "test": Permission denied cms=3D# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Thanks, Venkat -----Original Message----- From: Rob Sargent [mailto:robjsargent@gmail.com]=20 Sent: Tuesday, August 04, 2009 3:33 AM To: Venkateswara Rao Bondada Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Create table command fails with permission denied Looks to me as though you are not the owner of the schema nor superuser=20 nor in a role with permission to create tables in said schema. See the=20 DBA if it's not you. If it is sign on as postgres (superuser) and grant=20 yourself some access rights. Venkateswara Rao Bondada wrote: > > Hi, > > I'm new to PostgreSQL, and currently facing an issue with PostgreSQL=20 > 7.4 database. I'm getting the following error when tried to create a=20 > table. Please let me know the steps (with queries) that I should take=20 > care to resolve this issue. > > cms=3D# create table test(id character varying(80)); > > ERROR: could not create relation "test": Permission denied > > Thanks in advance, > > Venkat >