Skip site navigation (1) Skip section navigation (2)

Re: [PATCH] Proposed: Have SPI_connect fail if there is no current snapshot

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: [PATCH] Proposed: Have SPI_connect fail if there is no current snapshot
Date: 2005-08-13 22:22:06
Message-ID: 26239.1123971726@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> As per discussion on -hackers, type input functions can be called prior
> to there being a current snapshot, causing any queries you execute to
> fail with the "no snapshot has been set" error. So I propose to simply
> have SPI_connect fail right off the bat and document that to avoid
> future surprises.

This strikes me as a pretty unreasonable restriction.  It would be OK
if there were no valid uses of SPI that didn't require a snapshot, but
that's not so.  As an example, consider trying to issue a LOCK TABLE
command via SPI (okay, there are other ways to do that, but it's still
a valid example).

			regards, tom lane

In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2005-08-13 22:24:01
Subject: Re: gettime() - a timeofday() alternative
Previous:From: markDate: 2005-08-13 21:35:38
Subject: Re: gettime() - a timeofday() alternative

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group