Tzahi Fadida <tzahi(dot)ml(at)gmail(dot)com> writes:
> I am not sure about the definition of a context of a single SQL command.
Well, AFAICS selecting a disjunction ought to qualify as a single SQL
command using a single snapshot. It's not that different from a JOIN
or UNION operation, no?
> Inside C-language FullDisjunctions() function i repeatedly call, using
> SELECT * FROM Relation1;
> SELECT * FROM Relation2;
> SELECT * FROM Relation1 WHERE...;
> SELECT * FROM Relation3;
You would need to force all these operations to be done with the same
snapshot; should be possible with SPI_execute_snapshot. But really the
above sounds like a toy prototype implementation to me. Why aren't you
building this as executor plan-tree machinery?
> 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.
Why? You could use a tuplestore for transient data.
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Josh Berkus||Date: 2006-06-01 17:28:09|
|Subject: Re: More thoughts about planner's cost estimates|
|Previous:||From: Tzahi Fadida||Date: 2006-06-01 15:57:53|
|Subject: Re: CTID issues and a soc student in need of help|