Обсуждение: [HACKERS] Re: [COMMITTERS] 'postgres95/src/bin/destroydb destroydb.sh'
On Sun, 1 Jun 1997, Thomas G. Lockhart wrote:
> Marc G. Fournier wrote:
> > I am including a patch for destroydb to ask for confirmation before
> > deleting databases (after I accidentally deleted mine)...destroydb -y
> > would force delete without any confirmation.
>
> Uh, "destroydb" would seem to be a specific-enough command that if you
> type it, you actually wanted to delete a database :)
>
> Would have preferred that the behavior remained as-is, myself.
Its too simple to backout (I love CVS *grin*)...anyone else have an
opinion one way or the other? Its sort of like some systems alias rm -i to
rm...just in case
Marc G. Fournier
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
------------------------------
Well, rm is also a specific command, yet it's still a good idea to allow
for confirmations...Effects of destroydb are rather permanent ...
The reason I wanted to add this cause I intended to type destroyuser
but accidentally typed destroydb....*sigh* at least I have a backup...
Well...you can still do destroydb -y to force it...maybe building an
environment variable (something like PGFORCEDESTROY or something) would be
ok too...
=+=------------------------/\---------------------------------=+=
Igor Natanzon |**| E-mail: igor@sba.miami.edu
=+=------------------------\/---------------------------------=+=
On Sun, 1 Jun 1997, Thomas G. Lockhart wrote:
> Marc G. Fournier wrote:
> > I am including a patch for destroydb to ask for confirmation before
> > deleting databases (after I accidentally deleted mine)...destroydb -y
> > would force delete without any confirmation.
>
> Uh, "destroydb" would seem to be a specific-enough command that if you
> type it, you actually wanted to delete a database :)
>
> Would have preferred that the behavior remained as-is, myself.
>
> - Tom
>
------------------------------
Re: [HACKERS] Re: [COMMITTERS] 'postgres95/src/bin/destroydb destroydb.sh'
От
"Thomas G. Lockhart"
Дата:
How about "destroydb -i" a la "rm -i" to allow someone to alias the
definition to protect themselves without changing the default behavior
for everyone? (Rather than "destroydb -y" to suppress the confirmation
message?)
- Tom
------------------------------
Re: [HACKERS] Re: [COMMITTERS] 'postgres95/src/bin/destroydb destroydb.sh'
От
The Hermit Hacker
Дата:
On Sun, 1 Jun 1997, Thomas G. Lockhart wrote:
> How about "destroydb -i" a la "rm -i" to allow someone to alias the
> definition to protect themselves without changing the default behavior
> for everyone? (Rather than "destroydb -y" to suppress the confirmation
> message?)
Sounds great to me...Igor?
Marc G. Fournier
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
------------------------------
I guess that's fine..I only patched this up in frustration...
If people will agree with destroydb -i to be interactive one, I'll change
it...
=+=------------------------/\---------------------------------=+=
Igor Natanzon |**| E-mail: igor@sba.miami.edu
=+=------------------------\/---------------------------------=+=
On Sun, 1 Jun 1997, Thomas G. Lockhart wrote:
> How about "destroydb -i" a la "rm -i" to allow someone to alias the
> definition to protect themselves without changing the default behavior
> for everyone? (Rather than "destroydb -y" to suppress the confirmation
> message?)
>
> - Tom
>
------------------------------
Yea..sounds cool..I'll repatch it today...
=+=------------------------/\---------------------------------=+=
Igor Natanzon |**| E-mail: igor@sba.miami.edu
=+=------------------------\/---------------------------------=+=
On Sun, 1 Jun 1997, The Hermit Hacker wrote:
> On Sun, 1 Jun 1997, Thomas G. Lockhart wrote:
>
> > How about "destroydb -i" a la "rm -i" to allow someone to alias the
> > definition to protect themselves without changing the default behavior
> > for everyone? (Rather than "destroydb -y" to suppress the confirmation
> > message?)
>
> Sounds great to me...Igor?
>
> Marc G. Fournier
> Systems Administrator @ hub.org
> primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
>
>
------------------------------
> > Marc G. Fournier wrote: > > I am including a patch for destroydb to ask for confirmation before > > deleting databases (after I accidentally deleted mine)...destroydb -y > > would force delete without any confirmation. > > Uh, "destroydb" would seem to be a specific-enough command that if you > type it, you actually wanted to delete a database :) > > Would have preferred that the behavior remained as-is, myself. I agree with this, if we are voting. - -- Bruce Momjian maillist@candle.pha.pa.us ------------------------------
On Sun, 1 Jun 1997, The Hermit Hacker wrote: > On Sun, 1 Jun 1997, Thomas G. Lockhart wrote: > > > Marc G. Fournier wrote: > > > I am including a patch for destroydb to ask for confirmation before > > > deleting databases (after I accidentally deleted mine)...destroydb -y > > > would force delete without any confirmation. > > > > Uh, "destroydb" would seem to be a specific-enough command that if you > > type it, you actually wanted to delete a database :) > > > > Would have preferred that the behavior remained as-is, myself. > > Its too simple to backout (I love CVS *grin*)...anyone else have an > opinion one way or the other? Its sort of like some systems alias rm -i to > rm...just in case Having had to restore entire systems because someone typed "rm -r abc *" instead of "rm -r abc*", I'd put the confirmation in. IE. it's not that you didn't mean to type "destroydb", but whether you get the database name correct or not. How often does someone destroy a database anyway that a confirmation makes it more of a pain? Why not provide a command line flag to override confirmation for those who might call destroydb from a script. +----------------------+---+ | Ross Johnson | | E-Mail: rpj@ise.canberra.edu.au | Info Sciences and Eng|___| | University of Canberra | FAX: +61 6 2015227 | PO Box 1 | | Belconnen ACT 2616 | WWW: http://willow.canberra.edu.au/~rpj/ | AUSTRALIA | +--------------------------+ ------------------------------