Re: CTID issues and a soc student in need of help - Mailing list pgsql-hackers

From Tzahi Fadida
Subject Re: CTID issues and a soc student in need of help
Date
Msg-id 1149177474.4871.37.camel@llord
Whole thread Raw
In response to Re: CTID issues and a soc student in need of help  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: CTID issues and a soc student in need of help
List pgsql-hackers
I am not sure about the definition of a context of a single SQL command.

Example of a run:

A <- SELECT getfdr('Relation1,Relation2,Relation3');
to get the result schema (takes a few milliseconds).
SELECT * FROM FullDisjunctions('Relation1,Relation2,Relation3') AS
RECORD A;
Can take a long time.

Inside C-language FullDisjunctions() function i repeatedly call, using
SPI:
SELECT * FROM Relation1;
SELECT * FROM Relation2;
SELECT * FROM Relation1 WHERE...;
SELECT * FROM Relation3;
....

So i call using one SQL to FullDisjunction and subsequent SQL calls in
it. I wish that the context of the overall SELECT FullDisjunctions
will be perfectly unchanged for all subsequent SQL calls inside it
and especially the CTID.

p.s.: In a different version of the function i create a temporary
relation and insert tuples in it, but it is exclusively used and
destroyed by the specific instance of that function. I hope it does not
affect anything in the general sense of a read only transaction.

10x!
Regards,tzahi.

On Thu, 2006-06-01 at 11:28 -0400, Tom Lane wrote:
> 
> I think this is OK within the context of a single SQL command, since
> tuple visibility should not change for that command.  If you were trying
> to use the CTID info across multiple statements then it'd get worrisome.
> 
>             regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: CTID issues and a soc student in need of help
Next
From: Tom Lane
Date:
Subject: Re: CTID issues and a soc student in need of help