Re: Does update = delete + insert ? - Mailing list pgsql-general

From Steve Atkins
Subject Re: Does update = delete + insert ?
Date
Msg-id 6AC6AD90-9779-47AB-9950-40016E9F7E0A@blighty.com
Whole thread Raw
In response to Does update = delete + insert ?  ("Gauthier, Dave" <dave.gauthier@intel.com>)
Responses Re: Does update = delete + insert ?  ("Gauthier, Dave" <dave.gauthier@intel.com>)
List pgsql-general
On May 26, 2010, at 11:41 AM, Gauthier, Dave wrote:

> Hi:
>
> Under the hood, does PG implement an update statement as a delete followed by an insert?    I’m at a point in coding
ascript where it would be more expeditious for me to delete/insert a record as opposed to update and want to know if I
loseanything by doing that. 

As far as writes to the table are concerned, yes they're pretty much the same.

If there are triggers on the table, though, they may see the two actions differently.

Cheers,
  Steve

pgsql-general by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: Does update = delete + insert ?
Next
From: "Gauthier, Dave"
Date:
Subject: Re: Does update = delete + insert ?