Re: Disruptive corruption of data during an update

From: ennio <eiannucci(at)tin(dot)it>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Disruptive corruption of data during an update
Date: 2012-03-29 14:04:26
Message-ID: 20120329140426.GA28601@deby.ei.hnet
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

* Binand Sethumadhavan <binand(at)gmx(dot)net> [290312, 17:03]:
>
> Because of the single quote being at the wrong place, your query was
> processed as though not having a where clause at all, and the ENTIRE
> table got updated with the text:
> [...]
> in the autore field (and similarly in the argomento field).
>
Oh yes, I did realize that, but too late ;(

> What I typically do is to attach "where 1 = 0" to inhibit a query from
> making any changes, if I find an error in a multiline query and do not
> want to Control-C out of psql.
>
> Binand

Thanks for your suggestion, regards,
ennio

--
[Perche' usare Win$ozz (dico io) se ..."anche uno sciocco sa farlo. \\?//
Fa' qualche cosa di cui non sei capace!" (diceva Henry Miller) ] (°|°)
Ricevo solo messaggi Content-Type: plain/text (no html o multipart). )=(
!!! --> e-mail a mio nome via OE (M$) sono false e infette <-- !!!

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Ennio-Sr 2012-03-29 16:00:13 Re: Disruptive corruption of data during an update
Previous Message Steve T 2012-03-29 12:40:55 Re: Disruptive corruption of data during an update