Re: [HACKERS] Where to call SetQuerySnapshot

2002-10-08 Thread Joe Conway
Tom Lane wrote: > I did this and ended up with a rather long list of statement types that > might need a snapshot: > > elog(DEBUG2, "ProcessUtility"); > > /* set snapshot if utility stmt needs one */ > /* XXX maybe cleaner to list those that should

Re: [HACKERS] Where to call SetQuerySnapshot

2002-10-08 Thread Tom Lane
I said: > ... So I had > been thinking of pulling it out to postgres.c anyway. I will do that. I did this and ended up with a rather long list of statement types that might need a snapshot: elog(DEBUG2, "ProcessUtility"); /* set snapshot if utility stmt needs o

Re: [HACKERS] Where to call SetQuerySnapshot

2002-10-08 Thread Tom Lane
Joe Conway <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> 1. Where is the cleanest place to call SetQuerySnapshot() for utility >> statements that need it? > Without looking at it too closely, I would think postgres.c would be best, > unless there is a legit reason for a utility statement to *

Re: [HACKERS] Where to call SetQuerySnapshot

2002-10-07 Thread Joe Conway
Tom Lane wrote: > 1. Where is the cleanest place to call SetQuerySnapshot() for utility > statements that need it? Should we follow the lead of the existing > COPY code, and add the call to the ExecuteStmt case in utility.c? > Or should we move the calls into the command-specific routines (DoCopy

[HACKERS] Where to call SetQuerySnapshot

2002-10-07 Thread Tom Lane
I noticed that the new EXECUTE statement does not call SetQuerySnapshot, which seems like a bad thing. The omission is masked by the defensive code in CopyQuerySnaphot, which will automatically do SetQuerySnapshot if it hasn't been done yet in the current transaction. However, this doesn't provi