Re: Table appears on listing but can't drop it

From: Fernando Morgenstern <fernando(at)consultorpc(dot)com>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Table appears on listing but can't drop it
Date: 2010-01-08 16:55:26
Message-ID: 3588E5EF-52D3-4796-A617-F5A878585B5E@consultorpc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Em 08/01/2010, às 14:48, Tom Lane escreveu:

> Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> writes:
>> On 01/08/2010 08:39 AM, Fernando Morgenstern wrote:
>>> Name | Owner | Encoding | Collation | Ctype | Access privileges
>>> -----------+----------+----------+-------------+-------------+-----------------------
>>> skynet | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
>>> t1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
>>> template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
>>> : postgres=CTc/postgres
>>> template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
>>> : postgres=CTc/postgres
>
>> You have a space at the beginning of the name. Try:
>> drop database " skynet";
>
> I'm not sure about that, because the whole row seems to be offset in
> his email. That could be just copy-and-paste sloppiness. Still,
> some sort of non-printing character in the name seems to be indicated,
> else he'd not have been able to create another db with name "skynet".
>
> Try something like
> select '"' || datname || '"' from pg_database
> to get a clearer view of what's really in there.
>
> regards, tom lane

Hello,

Thanks for your quick answers. The extra space is indeed a copy-and-paste issue. Here it is the select that you suggested:

postgres=# select '"' || datname || '"' from pg_database;
?column?
-------------
"template1"
"template0"
"t1"
"skynet"

Best Regards,
---

Fernando Marcelo
www.consultorpc.com
fernando(at)consultorpc(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mark Morgan Lloyd 2010-01-08 16:59:04 Re: Server name in psql prompt
Previous Message Alvaro Herrera 2010-01-08 16:53:40 Re: Rows missing from table despite FK constraint