Is querying SPITupleTable with SQL possible?

Поиск
Список
Период
Сортировка
От Tom Mercha
Тема Is querying SPITupleTable with SQL possible?
Дата
Msg-id AM0PR04MB473728B53DDB36FC30C1A090F49C0@AM0PR04MB4737.eurprd04.prod.outlook.com
обсуждение исходный текст
Ответы Re: Is querying SPITupleTable with SQL possible?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Dear Hackers

I am using PostgreSQL's SPI to execute a simple SQL query (SELECT * FROM 
...) via SPI_exec. As a a result, I get an SPITupleTable with the 
results of my query.

Now that I have the SPITupleTable, I was wondering if it would be 
possible to later query over it further in my SQL statements using SPI, 
for example, something a bit similar to SPI_Exec ("Select * FROM 
:mySPITupleTable", 0);

My motivation is to treat, and use the SPITupleTable as 'intermediate' 
or 'temporary' tables which I would discard early - I want to apply a 
series of manipulations to my SPITupleTable before I would finally store 
it in the tablespace. Therefore, minimization of any overheads is also 
very important. I understand that I could introduce a CREATE TABLE to my 
SQL query and reference a table in that way, but I am under the 
impression that it would incur unnecessary overheads?

So, I would be grateful if anyone could help me understand how to 
manipulate the SPITupleTable further with SQL or indicate if it is at 
all possible. In the case that it is not possible, I would also be 
interested in alternatives and discussion on overheads.

Thanks in advance.

Best,
Tom

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Larry Rosenman
Дата:
Сообщение: Re: Peripatus: Can someone look?
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: dropdb --force