SPI question...

From: "Scott Muir" <wsmuir(at)islandnet(dot)com>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: SPI question...
Date: 2000-12-12 21:15:05
Message-ID: 000201c06480$999f0160$0a00a8c0@lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

I'm working on a module which uses the SPI... I'm not making sense of the
docs for this...

Where I differ from the example in the Programmers dox, is I'm wanting to
pull together information from more than one table in my db.

In the documentation, the algorithm section for "SPI_exec" seems to have the
text as in the same section for "SPI_finish"...

Anyways, if someone could clarify for me,

1) if more than one query plan is executed, are the result tupletables
available at the same time, or are the tupletables overwritten each time a
plan is executed? Is there a way of protecting the results?

2) if the tupletables do stack up, how does one explicitly dispose of them?

Re: memory management.. as I understand it the difference between upper and
context memory: upper is like global or static memory, remains intact;
context is scoped to the C function it was constructed in, and is
automatically disposed of when the context is disposed of.

I am a novice C programmer and am pretty much learning C as a useful
side-effect of implementing this solution. so:

3) is the context referring to anything going on inside the connection? or
are we talking when a C function containing the declarations for TupleDesc
and SPITupleTable returns and discards its local variables?

Thank you,
Scott..

Browse pgsql-interfaces by date

  From Date Subject
Next Message Lamar Owen 2000-12-12 22:10:30 Testing newsgroup posting for Marc. :-)
Previous Message Lamar Owen 2000-12-12 19:10:16 Re: StarOffice 5.2 for Linux and ODBC