Re: More problem with scripts

From: Brent Verner <brent(at)rcfile(dot)org>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: More problem with scripts
Date: 2002-01-03 18:56:43
Message-ID: 20020103185643.GA27503@rcfile.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

[2002-01-03 13:12] Bruce Momjian said:
| Look at this:
|
| $ dropdb lijasdf oiuwqe test
| DROP DATABASE
|
| The create/drop scripts only process the last arguments, ignoring
| earlier ones. I assume no one wants me to fix it now so I will add this
| to TODO:

something /simple/ might look like.

Index: dropdb
===================================================================
RCS file: /var/cvsup/pgsql/src/bin/scripts/dropdb,v
retrieving revision 1.13
diff -c -r1.13 dropdb
*** dropdb 30 Sep 2001 22:17:51 -0000 1.13
--- dropdb 3 Jan 2002 18:54:17 -0000
***************
*** 88,94 ****
exit 1
;;
*)
! dbname="$1"
;;
esac
shift
--- 88,95 ----
exit 1
;;
*)
! [ ! -z "$dbname" ] && usage=1
! dbname=$1
;;
esac
shift
***************
*** 132,137 ****
--- 133,141 ----


dbname=`echo $dbname | sed 's/\"/\\\"/g'`
+
+ echo $dbname
+ exit 0;

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

--
"Develop your talent, man, and leave the world something. Records are
really gifts from people. To think that an artist would love you enough
to share his music with anyone is a beautiful thing." -- Duane Allman

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavlo Baron 2002-01-03 18:59:03 Re: Smb to get involved
Previous Message Bruce Momjian 2002-01-03 18:24:26 Re: Bulkloading using COPY - ignore duplicates?