Re: Does update = delete + insert ?

Поиск
Список
Период
Сортировка
От Gauthier, Dave
Тема Re: Does update = delete + insert ?
Дата
Msg-id 482E80323A35A54498B8B70FF2B879800458C31081@azsmsx504.amr.corp.intel.com
обсуждение исходный текст
Ответ на Re: Does update = delete + insert ?  (Steve Atkins <steve@blighty.com>)
Список pgsql-general
Ohhhh.. Yes, I forgot about the triggers.
Good call !!!  This table has lots of triggers.

Thanks for reminding me of this!!!



-----Original Message-----
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Steve Atkins
Sent: Wednesday, May 26, 2010 3:05 PM
To: pgsql-general General
Subject: Re: [GENERAL] Does update = delete + insert ?


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
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

В списке pgsql-general по дате отправления:

Предыдущее
От: Steve Atkins
Дата:
Сообщение: Re: Does update = delete + insert ?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: cursor_to_xml iteration of a table