help with SPI_<commands> Please

From: Mike Haberman <mikeh(at)ncsa(dot)uiuc(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: help with SPI_<commands> Please
Date: 1999-07-01 16:25:12
Message-ID: 199907011625.LAA05954@pecos.ncsa.uiuc.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello experts.

I am writing my first function using the SPI_ interface.

I don't know how to access data that I just selected.

here's the outline:

my question is in the block comments

thanks a ton!!!!

mike



int32 allocate_address(int32 networkID)
{
char[255] query;

if (SPI_connect() < 0) {
return 0;
}

sprintf(query,
"Select addressID FROM networkaddress WHERE networkid = %i",
networkID);

if (SPI_exec(query, 1) < 0) {
return 0;
}

/* ############################################################ */
/* how do I access the data that I just selected ? */
/* ie I want to find the value of the each row in the select
/* ############################################################ */

SPI_finish();

return 1;
}
~

Browse pgsql-general by date

  From Date Subject
Next Message Michael Edwin Haberman 1999-07-01 16:34:46 help with SPI_<commands> Please
Previous Message Anja Speerforck 1999-07-01 15:56:10 Re: [GENERAL] JOIN exclusion problem