"no snapshot has been set" error

From: Ruey-Lung Hsiao <rlhsiao(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: "no snapshot has been set" error
Date: 2004-11-18 23:13:29
Message-ID: t0and.46135$QJ3.38032@newssvr21.news.prodigy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

I encountered a problem when I'm implementing my user-defined type.
My user-defined type is defined as

CREATE TYPE X
(
INTERNALLENGTH = 10
INPUT = X_in,
OUTPUT = X_out
);

In my X_in() function, I want to access other table to do some
bookkeeping stuff. this table keeps track of the number of calls to
X_in(). However, while SPI_connect() returns SPI_OK_CONNECT, whenever I
execute SPI_exec( "SELECT count FROM XTABLE", 0), postgres stops
executing and issues "Error: no snapshot has been set".

Does anyone here knows what happens? Am I not allowed to use SPI
functions in this situation?

Thank you for your advice and suggestions in advance.

Ruey-Lung Hsiao

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-11-18 23:17:49 Re: OpenBSD/Sparc status
Previous Message Simon Riggs 2004-11-18 22:58:15 Re: [Testperf-general] Re: ExclusiveLock