Re: [HACKERS] INSERT/SELECT and excessive foreign key checks

2007-08-20 Thread Lodewijk Vöge
On 19-aug-2007, at 12:38, Tom Lane wrote: Hack is the right word. People keep proposing variants of the idea that the executor should optimize updates on the basis of examining the query tree to see whether columns changed or not, and they're always wrong. You don't know what else might

Re: [HACKERS] INSERT/SELECT and excessive foreign key checks

2007-08-21 Thread Lodewijk Vöge
On 19-aug-2007, at 12:38, Tom Lane wrote: An additional problem with your proposal is that it fails to consider other changes that might be happening concurrently -- eg, what if some other backend deletes a source row after you copy it, and commits before you do? then the patch indeed

Re: [HACKERS] INSERT/SELECT and excessive foreign key checks

2007-08-21 Thread Lodewijk Vöge
On 21-aug-2007, at 10:55, Alvaro Herrera wrote: It might go in if it's correct. If you have an answer to all the objections then there's no reason not to include it. But I must admit I didn't understand what was your answer to the above objection; care to rephrase? sorry, egg on my