Skip site navigation (1) Skip section navigation (2)

Re: CTID issues and a soc student in need of help

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tzahi Fadida <tzahi(dot)ml(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: CTID issues and a soc student in need of help
Date: 2006-06-01 16:45:26
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
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
> SPI:
> 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 BerkusDate: 2006-06-01 17:28:09
Subject: Re: More thoughts about planner's cost estimates
Previous:From: Tzahi FadidaDate: 2006-06-01 15:57:53
Subject: Re: CTID issues and a soc student in need of help

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group