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

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Table appears on listing but can't drop it
Дата
Msg-id 4B47724D.2080401@gmail.com
обсуждение исходный текст
Ответ на Re: Table appears on listing but can't drop it  (Fernando Morgenstern <fernando@consultorpc.com>)
Ответы Re: Table appears on listing but can't drop it  (Adrian Klaver <adrian.klaver@gmail.com>)
Re: Table appears on listing but can't drop it  (Fernando Morgenstern <fernando@consultorpc.com>)
Список pgsql-general
On 01/08/2010 09:53 AM, Fernando Morgenstern wrote:
> Em 08/01/2010, às 15:49, Adrian Klaver escreveu:
>
>> On 01/08/2010 08:55 AM, Fernando Morgenstern wrote:
>>
>>> 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@consultorpc.com
>>
>> Can you connect to it?
>>
>> --
>> Adrian Klaver
>> adrian.klaver@gmail.com
>
> No, i get this:
>
> $ psql skynet
> psql: FATAL:  database "skynet" does not exist
>
> I can create a database with the same name:
>
> postgres=# create database skynet;
> CREATE DATABASE
>
> postgres=# select '"' || datname || '"' from pg_database;
>    ?column?
> -------------
>   "template1"
>   "template0"
>   "postgres"
>   "t1"
>   "skynet"
>   "skynet"
>
> And drop the newly created database:
>
> postgres=# drop database skynet;
> DROP DATABASE
> postgres=# select '"' || datname || '"' from pg_database;
>    ?column?
> -------------
>   "template1"
>   "template0"
>   "postgres"
>   "t1"
>   "pgpool"
>   "skynet"
>
> Strange, isn't it?
>
>

Actually what is strange is that your previous listing :
postgres=# select '"' || datname || '"' from pg_database;
    ?column?
  -------------
   "template1"
   "template0"
   "t1"
   "skynet"

is not the same as the one above:

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

In particular the presence of postgres,t1 and pgpool.

Are you sure which cluster you are pointing at and whether the psql
version matches the server version?

--
Adrian Klaver
adrian.klaver@gmail.com

В списке pgsql-general по дате отправления:

Предыдущее
От: Mark Morgan Lloyd
Дата:
Сообщение: Re: Server name in psql prompt
Следующее
От: Anton Belyaev
Дата:
Сообщение: Huge iowait during checkpoint finish