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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-08-13 22:24:01 Re: gettime() - a timeofday() alternative
Previous Message mark 2005-08-13 21:35:38 Re: gettime() - a timeofday() alternative