Re: Revoke - database does not exist

From: Tomáš Vondra <tv(at)fuzzy(dot)cz>
To: Prashanth Kumar <prashanthk(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Revoke - database does not exist
Date: 2014-05-02 01:02:08
Message-ID: mailbox-20634-1398992530-817241@smtp-out2.gransy.com.gransy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<p dir="ltr">I guess you need to quote the identifier, as you use mixed case. I.e. try "myDB" with the double quotes.</p>
<p dir="ltr">Tomas</p>
<div class="quote">Dne 2. 5. 2014 2:49 Prashanth Kumar &lt;prashanthk(at)hotmail(dot)com&gt; napsal(a):<br type='attribution'><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi,<br><br>Do not seem to figure out what is wrong here. Why am I getting database does not exist.&nbsp; I just created the database and am able to connect to it as "postgres" user.<br>&nbsp;I am trying to restrict&nbsp; "testuser" from connecting to "myDB" database. <br><br>Thanks in advance.<br><br><br>postgres(at)ulinux3:~$ createuser -D -S -R -P testuser<br>Enter password for new role:<br>Enter it again:<br>postgres(at)ulinux3:~$ createdb myDB<br>postgres(at)ulinux3:~$ psql<br>psql (9.3.4)<br>Type "help" for help.<br><br>postgres=# REVOKE ALL PRIVILEGES&nbsp; ON DATABASE myDB FROM testuser;<br>ERROR:&nbsp; database "mydb" does not exist<br>postgres=# \q<br>postgres(at)ulinux3:~$ psql myDB<br>psql (9.3.4)<br>Type "help" for help.<br><br>myDB=# REVOKE ALL PRIVILEGES&nbsp; ON DATABASE myDB FROM testuser;<br>ERROR:&nbsp; database "mydb" does not exist<br><br><br><br>--Prashanth Kumar<br><br> </div></body>
</html></blockquote></div>

Attachment Content-Type Size
unknown_filename text/html 1.5 KB

Browse pgsql-general by date

  From Date Subject
Next Message David G Johnston 2014-05-02 01:20:05 Re: Revoke - database does not exist
Previous Message Prashanth Kumar 2014-05-02 00:49:09 Revoke - database does not exist