Re: psql -l gives bad output

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

> >
> > 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...

RH 7.2; Postgres 7.2.1

bash-2.05$ BLAH='ab
> cd'
bash-2.05$ echo $BLAH
ab cd
bash-2.05$ echo "$BLAH"
ab
cd

[root(at)vault bin]# diff -c dropdb.orig dropdb
*** dropdb.orig Tue May 21 22:40:33 2002
--- dropdb Tue May 21 22:40:46 2002
***************
*** 131,137 ****
fi

! dbname=`echo $dbname | sed 's/\"/\\\"/g'`

${PATHNAME}psql $PSQLOPT -d template1 -c "DROP DATABASE \"$dbname\""
if [ "$?" -ne 0 ]; then
--- 131,137 ----
fi

! dbname=`echo "$dbname" | sed 's/\"/\\\"/g'`

${PATHNAME}psql $PSQLOPT -d template1 -c "DROP DATABASE \"$dbname\""
if [ "$?" -ne 0 ]; then

Browse pgsql-general by date

  From Date Subject
Next Message David.Lofstrand 2002-05-22 07:34:17 I need minimum specs for running PostgreSQL
Previous Message Ron Snyder 2002-05-22 05:07:58 Re: psql -l gives bad output

Browse pgsql-hackers by date

  From Date Subject
Next Message Oliver Elphick 2002-05-22 08:23:57 Intrerval oddities
Previous Message Hannu Krosing 2002-05-22 04:33:45 Re: Redhat 7.3 time manipulation bug