From: | Perry Smith <pedzsan(at)gmail(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: "Pretend" update |
Date: | 2013-10-01 18:12:59 |
Message-ID: | 9B050B36-9CB2-4CC1-8933-CE6B44B1A2B3@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Oct 1, 2013, at 12:23 PM, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> wrote:
> On 10/01/2013 10:16 AM, Perry Smith wrote:
>> With "make" I can do "make -n" and it just tells me what it would do but doesn't actually do anything.
>>
>> How could I do that with SQL?
>>
>> I want to write a really complicated (for me) SQL UPDATE statement. I'm sure I won't get it right the first time. Is there an easy way to not really make the changes?
>>
>> I've thought about starting a transaction and then roll it back. That would undo the changes. But I won't be able to tell what the changes were.
>
> 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...
Thank you very much
Perry
From | Date | Subject | |
---|---|---|---|
Next Message | Victor Yegorov | 2013-10-01 18:38:25 | Re: "Pretend" update |
Previous Message | Adrian Klaver | 2013-10-01 17:23:33 | Re: "Pretend" update |