Re: [HACKERS] SPI: ERROR: no snapshot has been set

2005-08-17 Thread Martijn van Oosterhout
For future reference, I got around this error (no snapshot has been set) by removing the use of SPI and just using heap_open / heap_beginscan / heap_endscan / heap_close. It's only slightly more code but it works irrespective of the state of the backend. Have a nice day, On Sat, Aug 13, 2005 at 0

Re: [HACKERS] SPI: ERROR: no snapshot has been set

2005-08-13 Thread Tom Lane
Martijn van Oosterhout writes: >> I'm a bit concerned about the possible side-effects of this on existing >> behavior, though. In particular constructs like >> 'now'::timestamp >> would change behavior subtly. > It's a good idea, eventually. All it would do is change the time it's > evaluat

Re: [HACKERS] SPI: ERROR: no snapshot has been set

2005-08-13 Thread Martijn van Oosterhout
On Sat, Aug 13, 2005 at 12:36:42PM -0400, Tom Lane wrote: > Martijn van Oosterhout writes: > > - Is there a way to detect if a snapshot has been started and creating > > one if there hasn't. I've seen the snapshot related functions but I > > don't feel comfortable sticking them in my type input fu

Re: [HACKERS] SPI: ERROR: no snapshot has been set

2005-08-13 Thread Tom Lane
Martijn van Oosterhout writes: > - Is there a way to detect if a snapshot has been started and creating > one if there hasn't. I've seen the snapshot related functions but I > don't feel comfortable sticking them in my type input function just to > fix this. Is it safe? This would be a pretty bad

[HACKERS] SPI: ERROR: no snapshot has been set

2005-08-13 Thread Martijn van Oosterhout
[Please CC any replies, thanks] Hi, I got this nice error, and according to Tom Lane[1]: > Depending on what PG version you're using (which you did not say, > naughty naughty) there are paths in interactive query entry that > might try to execute datatype input functions before setting the > que