Search Postgresql Archives

Re: Does update = delete + insert ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 a script where it would be more expeditious for me to delete/insert a record as opposed to update and want to know if I lose anything 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@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux