Search Postgresql Archives

Re: "Pretend" update

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

 



2013/10/1 Perry Smith <pedzsan@xxxxxxxxx>

On Oct 1, 2013, at 12:23 PM, Adrian Klaver <adrian.klaver@xxxxxxxxx> wrote:

> Assuming you are not doing this in a function, you can. Do UPDATE, then SELECT to see your changes or not and then ROLLBACK.

Ah... yes.  I forgot you can see the changes within the same transaction.  Dohhh...

It is possible to use RETURNING clause of the UPDATE statement and avoid SELECT.

And yes, it is necessary to do this within a transaction and roll it back after.

--
Victor Y. Yegorov

[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