Re: psql -l gives bad output - Mailing list pgsql-general

From Tom Lane
Subject Re: psql -l gives bad output
Date
Msg-id 21321.1022043419@sss.pgh.pa.us
Whole thread Raw
In response to Re: psql -l gives bad output  (Ron Snyder <snyder@roguewave.com>)
List 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 by date:

Previous
From: Ron Snyder
Date:
Subject: Re: psql -l gives bad output
Next
From: Ron Snyder
Date:
Subject: Re: psql -l gives bad output