Re: psql -l gives bad output

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: psql -l gives bad output
Дата
Msg-id 21321.1022043419@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: psql -l gives bad output  (Ron Snyder <snyder@roguewave.com>)
Список pgsql-general
Ron Snyder <snyder@roguewave.com> writes:
> It looks to me like this 'second paytest' database is actually named
> 'pay-test\n/usr/local/pgsql/bi' , possibly created by trying to create a
> database without having a closing quote:

I concur.

> The command dropdb doesn't seem (at least for me) to work the exact same
> way,

It works for me in current sources:

$ createdb 'ab
> cd'
CREATE DATABASE
$ psql -l
         List of databases
    Name    |  Owner   | Encoding
------------+----------+-----------
 ab
cd      | postgres | SQL_ASCII
 regression | postgres | SQL_ASCII
 template0  | postgres | SQL_ASCII
 template1  | postgres | SQL_ASCII
(4 rows)

$ dropdb 'ab
> cd'
DROP DATABASE
$ psql -l
         List of databases
    Name    |  Owner   | Encoding
------------+----------+-----------
 regression | postgres | SQL_ASCII
 template0  | postgres | SQL_ASCII
 template1  | postgres | SQL_ASCII
(3 rows)


But I recall a number of rounds of bug-fixes concerning quoting in
the pgsql shell scripts, so I'd not be surprised in the least to hear
that pre-7.2 PG releases get this wrong.  Or for that matter, we might
still have some problems in this line on some platforms with oddball
shells.  If you find that dropdb messes up with weird names in 7.2,
please send details about the test case and your platform...

            regards, tom lane

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

Предыдущее
От: Ron Snyder
Дата:
Сообщение: Re: psql -l gives bad output
Следующее
От: Ron Snyder
Дата:
Сообщение: Re: psql -l gives bad output