Re: psql -l gives bad output

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ron Snyder <snyder(at)roguewave(dot)com>
Cc: "'Jeff Beck'" <jeff(dot)beck(at)mssm(dot)edu>, pgsql-general(at)postgresql(dot)org
Subject: Re: psql -l gives bad output
Date: 2002-05-22 04:56:59
Message-ID: 21321.1022043419@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ron Snyder <snyder(at)roguewave(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron Snyder 2002-05-22 05:07:58 Re: psql -l gives bad output
Previous Message Ron Snyder 2002-05-22 04:36:04 Re: psql -l gives bad output