consistency check on SPI tuple count failed - Mailing list pgsql-hackers

From Gaetano Mendola
Subject consistency check on SPI tuple count failed
Date
Msg-id 000a01c35d4d$3d086090$10d4a8c0@mm.eutelsat.org
Whole thread Raw
Responses Re: consistency check on SPI tuple count failed
List pgsql-hackers
Hi all,
the following code was working properly under Postgres 7.3.X
I'm now running my regression test with Postgres 7.4beta1 and I'm
having the error in subj.

CREATE TABLE test ( a integer, b integer );

INSERT INTO test VALUES ( 1 );

CREATE OR REPLACE FUNCTION foo(INTEGER)
RETURNS INTEGER AS'
BEGIN    RETURN $1 + 1;
END;
' LANGUAGE 'plpgsql';


CREATE OR REPLACE FUNCTION bar()
RETURNS INTEGER AS'
DECLARE   my_ret RECORD;
BEGIN        FOR my_ret IN         SELECT foo(a) AS ret         FROM test    LOOP         IF my_ret.ret = 3 THEN
       RETURN -1;         END IF;                       END LOOP;
 
    RETURN 0;

END;
' LANGUAGE 'plpgsql';



Regards
Gaetano Mendola




pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Re: new psql \d command
Next
From: "Gaetano Mendola"
Date:
Subject: Re: consistency check on SPI tuple count failed