Re: DEALLOCATE IF EXISTS
От | Vik Reykja |
---|---|
Тема | Re: DEALLOCATE IF EXISTS |
Дата | |
Msg-id | CALDgxVsHxo5+iNwiM9hwi57h71wSgOkRfQE_613Mfx8bm46a+A@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: DEALLOCATE IF EXISTS (Heikki Linnakangas <hlinnakangas@vmware.com>) |
Ответы |
Re: DEALLOCATE IF EXISTS
|
Список | pgsql-hackers |
<br /><div class="gmail_extra"><div class="gmail_quote">On Tue, Nov 27, 2012 at 3:15 PM, Heikki Linnakangas <span dir="ltr"><<ahref="mailto:hlinnakangas@vmware.com" target="_blank">hlinnakangas@vmware.com</a>></span> wrote:<br /><blockquoteclass="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I fail to see thepoint of DEALLOCATE IF EXISTS. Do you have real use case for this, or was this just a case of adding IF EXISTS to allcommands for the sake of completeness?<br /><br /> Usually the client knows what statements have been prepared, but perhapsyou want to make sure everything is deallocated in some error handling case or similar. But in that case, you mightas well just issue a regular DEALLOCATE and ignore errors. Or even more likely, you'll want to use DEALLOCATE ALL.<spanclass="HOEnZb"><font color="#888888"></font></span><br /></blockquote></div><br />Hmm. The test case I had forit, which was very annoying in an "I want to be lazy" sort of way, I am unable to reproduce now. So I guess this becomesa "make it like the others" and the community can decide whether that's desirable.<br /><br />In my personal case,which again I can't reproduce because it's been a while since I've done it, DEALLOCATE ALL would have worked. I wasbasically preparing a query to work on it in the same conditions that it would be executed in a function, and I was onlyworking on one of these at a time so ALL would have been fine.<br /></div>
В списке pgsql-hackers по дате отправления: