Thread: Minor comment update for DELETE
Minor comment update. The line changed is in direct contradiction with the comment (and reality) of the code below this. The opposed comment starts at line 1548: /* * Note: Normally one would think that we have to delete index tuples * associated with the heap tuple now.. * * ... but in POSTGRES, we have no need to do this because the vacuum daemon * automatically opens an index scan and deletes index tuples when it * finds deleted heap tuples. -cim 9/27/89 */ Seems like its been wrong for a while... Best Regards, Simon Riggs
Attachment
On Fri, 2005-11-18 at 00:15 +0000, Simon Riggs wrote: > Minor comment update. Applied with adjustments. BTW, I noticed the following comment a few lines down in execMain.c (circa line 1564): * note: we can't run UPDATE queries with transactions * off because UPDATEs are actually INSERTs and our * scan will mistakenly loop forever, updating the tuple * it just inserted.. This should be fixed but until it * is, we don't want to get stuck in an infinite loop * which corrupts your database.. This seems obsolete; I'll remove it shortly barring any objections. -Neil
Neil Conway <neilc@samurai.com> writes: > BTW, I noticed the following comment a few lines down in execMain.c > (circa line 1564): > * note: we can't run UPDATE queries with transactions > * off because UPDATEs are actually INSERTs and our > * scan will mistakenly loop forever, updating the tuple > * it just inserted.. This should be fixed but until it > * is, we don't want to get stuck in an infinite loop > * which corrupts your database.. > This seems obsolete; I'll remove it shortly barring any objections. No, this is still correct, note the bootstrap-mode test at the start of the function. regards, tom lane