From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Tom Mercha <mercha_t(at)hotmail(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Is querying SPITupleTable with SQL possible? |
Date: | 2019-10-02 14:11:52 |
Message-ID: | 1001.1570025512@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Mercha <mercha_t(at)hotmail(dot)com> writes:
> 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);
It's possible you could use the "transition table" (aka
EphemeralNamedRelation) infrastructure for this, though I'm not sure
if it's really a close fit, or whether it's been built out enough to
support this usage. From memory, it wants to work with tuplestores,
which are a bit heavier-weight than SPITupleTables.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | James Coleman | 2019-10-02 14:22:17 | Re: Consider low startup cost in add_partial_path |
Previous Message | Masahiko Sawada | 2019-10-02 13:58:26 | Re: [HACKERS] Block level parallel vacuum |