help with SPI_ Please

Поиск
Список
Период
Сортировка
От Michael Edwin Haberman
Тема help with SPI_ Please
Дата
Msg-id 199907011634.JAA26241@Xenon.Stanford.EDU
обсуждение исходный текст
Список 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;
}


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

Предыдущее
От: Mike Haberman
Дата:
Сообщение: help with SPI_ Please
Следующее
От: Anja Speerforck
Дата:
Сообщение: Re: [GENERAL] JOIN exclusion problem