Create table command fails with permission denied
--_000_22640DE58AF78445BA8AB69FF76F07321AA2C20C0CBLRKECMBX01 ad_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi,
I'm new to PostgreSQL, and currently facing an issue with PostgreSQL 7.4 da=
tabase. I'm getting the following error when tried to create a table. Pleas=
e let me know the steps (with queries) that I should take care to resolve t=
his issue.
cms=3D# create table test(id character varying(80));
ERROR: could not create relation "test": Permission denied
Thanks in advance,
Venkat
--_000_22640DE58AF78445BA8AB69FF76F07321AA2C20C0CBLRKECMBX01 ad_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
[at] font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
[at] font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
..MsoChpDefault
{mso-style-type:export-only;}
[at] page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal>Hi,<o:p></o:p></p>
<p class=3DMsoNormal>I’m new to PostgreSQL, and currently facing an i=
ssue
with PostgreSQL 7.4 database. I’m getting the following error when tr=
ied
to create a table. Please let me know the steps (with queries) that I shoul=
d
take care to resolve this issue.<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>cms=3D# create table test(id character varying(80));<o=
:p></o:p></p>
<p class=3DMsoNormal>ERROR: could not create relation "test"=
;:
Permission denied<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>Thanks in advance,<o:p></o:p></p>
<p class=3DMsoNormal>Venkat<o:p></o:p></p>
</div>
</body>
</html>
--_000_22640DE58AF78445BA8AB69FF76F07321AA2C20C0CBLRKECMBX01 ad_--
Re: Create table command fails with permission denied
This is a multi-part message in MIME format.
--------------090107010309060303050002
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
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 [at] synechron.com
--------------090107010309060303050002
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
Venkateswara Rao Bondada wrote:
<blockquote
cite="mid:22640DE58AF78445BA8AB69FF76F07321AA2C20C0C [at] BLRKECM BX01.ad.infosys.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
[at] font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
[at] font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
..MsoChpDefault
{mso-style-type:export-only;}
[at] page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="Section1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">cms=# create table test(id character
varying(80));<o:p></o:p></p>
<p class="MsoNormal">ERROR: could not create relation "test":
Permission denied<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks in advance,<o:p></o:p></p>
<p class="MsoNormal">Venkat<o:p></o:p></p>
</div>
</blockquote>
<br>
<br>
login with postgres user like psql -Upostgres cms and THEN execute
create table statement. <br>
<br>
OR<br>
Refer this :
<a class="moz-txt-link-freetext" href="http://www.postgresql.org/docs/7.4/static/sql-grant.html">http://www.postgresql.org/docs/7.4/static/sql-grant.html</a><br>
<div class="moz-signature">-- <br>
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="ProgId" content="Word.Document">
<meta name="Generator" content="Microsoft Word 11">
<meta name="Originator" content="Microsoft Word 11">
<link rel="File-List" href="amit_files/filelist.xml">
<title>Regards, </title>
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Author>Amit</o:Author>
<o:LastAuthor>Amit</o:LastAuthor>
<o:Revision>1</o:Revision>
<o:TotalTime>2</o:TotalTime>
<o:Created>2009-05-28T13:41:00Z</o:Created>
<o:LastSaved>2009-05-28T13:43:00Z</o:LastSaved>
<o:Pages>1</o:Pages>
<o:Words>30</o:Words>
<o:Characters>177</o:Characters>
<o:Company>Synechron</o:Company>
<o:Lines>1</o:Lines>
<o:Paragraphs>1</o:Paragraphs>
<o:CharactersWithSpaces>206</o:CharactersWithSpaces>
<o:Version>11.5606</o:Version>
</o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridI
nCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
[at] font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:536871559 0 0 0 415 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
[at] page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
<div class="Section1">
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Verdana;">Regards, <o:p></o:p></span></p>
<p class="MsoNormal"><b><span
style="font-size: 10pt; font-family: Verdana; color: blue;"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><b><span
style="font-size: 10pt; font-family: Verdana; color: blue;">Amit Jain </span></b><b><span
style="font-size: 10pt; font-family: Verdana;"><br>
Synechron Technology Pvt. Ltd.<o:p></o:p></span></b></p>
<p class="MsoNormal"><span class="SpellE"><span class="GramE"><span
style="font-size: 10pt; font-family: Verdana;">Pune</span></span></span><span
class="GramE"><span style="font-size: 10pt; font-family: Verdana;">
411 057.</span></span><span
style="font-size: 10pt; font-family: Verdana;"><br>
<span class="GramE">Phone :</span> +91.20.40262000 Ext 2162 |
Mobile:+91.9373415075 | Fax: +91.20.30513500 <br>
<a class="moz-txt-link-freetext" href="http://www.synechron.com">http://www.synechron.com</a> | MailTo: <a class="moz-txt-link-abbreviated" href="mailto:amitjain [at] synechron.com">amitjain [at] synechron.com</a></span><span
style=""><br style="">
<!--[if !supportLineBreakNewLine]--><br style="">
<!--[endif]--><o:p></o:p></span></p>
</div>
</div>
</body>
</html>
--------------090107010309060303050002--
Re: Create table command fails with permission denied
--_000_22640DE58AF78445BA8AB69FF76F07321AA2C21011BLRKECMBX01 ad_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
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 C=
REATE, 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 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 "p=
ostgres".
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
From: Venkateswara Rao Bondada
Sent: Monday, August 03, 2009 6:26 PM
To: 'pgsql-admin [at] 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 da=
tabase. I'm getting the following error when tried to create a table. Pleas=
e let me know the steps (with queries) that I should take care to resolve t=
his issue.
cms=3D# create table test(id character varying(80));
ERROR: could not create relation "test": Permission denied
Thanks in advance,
Venkat
--_000_22640DE58AF78445BA8AB69FF76F07321AA2C21011BLRKECMBX01 ad_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
[at] font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
[at] font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
[at] font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
[at] font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.5pt;
font-family:Consolas;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:Consolas;}
..MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
[at] page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoPlainText>Hi,<o:p></o:p></p>
<p class=3DMsoPlainText>To add some more details to my question, I'm using
postgres account (which is a superuser in the database) to create table. Ta=
ble
creation is working fine in other databases except in this (cms). As postgr=
es
user, I granted CREATE, USAGE & ALL privileges to postgres account, sti=
ll
it didn't work.<o:p></o:p></p>
<p class=3DMsoPlainText>Please find the snapshots below where it works fine=
and
also where it doesn't work fine. And let me know what rights postgres accou=
nt
is missing to create tables in "cms" database.<o:p></o:p></p>
<p class=3DMsoPlainText><o:p> </o:p></p>
<p class=3DMsoPlainText>=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=
<o:p></o:p></p>
<p class=3DMsoPlainText>camd=3D# \c camd postgres<o:p></o:p></p>
<p class=3DMsoPlainText>You are now connected to database "camd" =
as
user "postgres".<o:p></o:p></p>
<p class=3DMsoPlainText>camd=3D# create table test(id character varying(80)=
); <o:p></o:p></p>
<p class=3DMsoPlainText>CREATE TABLE <o:p></o:p></p>
<p class=3DMsoPlainText>camd=3D# \c cms postgres You are now connected to d=
atabase
"cms" as user "postgres".<o:p></o:p></p>
<p class=3DMsoPlainText>cms=3D# create table test(id character varying(80))=
;<o:p></o:p></p>
<p class=3DMsoPlainText>ERROR: could not create relation "test&q=
uot;:
Permission denied cms=3D# <o:p></o:p></p>
<p class=3DMsoPlainText>=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=
<o:p></o:p></p>
<p class=3DMsoPlainText><o:p> </o:p></p>
<p class=3DMsoPlainText>Thanks,<o:p></o:p></p>
<p class=3DMsoPlainText>Venkat<o:p></o:p></p>
<p class=3DMsoNormal><span style=3D'color:#1F497D'><o:p> </o:p></span>=
</p>
<p class=3DMsoNormal><span style=3D'color:#1F497D'><o:p> </o:p></span>=
</p>
<div>
<div style=3D'border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in =
0in 0in'>
<p class=3DMsoNormal><b><span style=3D'font-size:10.0pt;font-family:"Tahoma=
","sans-serif"'>From:</span></b><span
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"' > Venkateswara =
Rao
Bondada <br>
<b>Sent:</b> Monday, August 03, 2009 6:26 PM<br>
<b>To:</b> 'pgsql-admin [at] postgresql.org'<br>
<b>Subject:</b> Create table command fails with permission denied<o:p></o:p=
></span></p>
</div>
</div>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>Hi,<o:p></o:p></p>
<p class=3DMsoNormal>I’m new to PostgreSQL, and currently facing an i=
ssue with
PostgreSQL 7.4 database. I’m getting the following error when tried t=
o create a
table. Please let me know the steps (with queries) that I should take care =
to
resolve this issue.<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>cms=3D# create table test(id character varying(80));<o=
:p></o:p></p>
<p class=3DMsoNormal>ERROR: could not create relation "test"=
;:
Permission denied<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>Thanks in advance,<o:p></o:p></p>
<p class=3DMsoNormal>Venkat<o:p></o:p></p>
</div>
</body>
</html>
--_000_22640DE58AF78445BA8AB69FF76F07321AA2C21011BLRKECMBX01 ad_--