Re: psql -l gives bad output

Поиск
Список
Период
Сортировка
От Ron Snyder
Тема Re: psql -l gives bad output
Дата
Msg-id F888C30C3021D411B9DA00B0D0209BE803BB99ED@cvo-exchange.cvo.roguewave.com
обсуждение исходный текст
Ответ на psql -l gives bad output  (Jeff Beck <jeff.beck@mssm.edu>)
Ответы Re: psql -l gives bad output
Список pgsql-general
> > The command dropdb doesn't seem (at least for me) to work
> the exact same
> > way,
>
> It works for me in current sources:

Current from cvs, or current 7.2.1?
bash-2.05$ createdb `ab
> cd
bash-2.05$ createdb 'ab
> cd'
CREATE DATABASE
bash-2.05$ dropdb 'ab
> cd'
ERROR:  DROP DATABASE: database "ab cd" does not exist
dropdb: database removal failed
bash-2.05$ psql template1 -c 'select version();'
                           version
-------------------------------------------------------------
 PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC 2.96
(1 row)
bash-2.05$ which psql dropdb
/usr/local/pgsql-7.2.1/bin/psql
/usr/local/pgsql-7.2.1/bin/dropdb

It's definitely not a problem for me, but it does seem odd that it works for
you and not for me. (I suppose since all I'm doing is sitting here sort of
watching nypd blue, I'll see if I can figure it out.) :)

-ron

>
> $ 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 по дате отправления:

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