Re: SPI_????

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: Tourtounis Sotiris <tourtoun(at)csd(dot)uoc(dot)gr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SPI_????
Date: 2002-11-07 20:09:36
Message-ID: m38z05xhtr.fsf@varsoon.wireboard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tourtounis Sotiris <tourtoun(at)csd(dot)uoc(dot)gr> writes:

> I want to ask a question that it may look totally stupid but i have stacked as
> a new user of postgresql!!!
>
> I want to take the result of a sql question of the general type "select
> att0 ..." where att0 is text and to store it to a C variable of char *. I
> have read that there is the SPI_exec that returns a number of the returned
> tupels of the question - if the result of my question is the SPI_getvalue
> could anyone show me a small example how to use it -if it's something
> else i would appreciate your advice .Thanks a priori.

SPI is only for C functions running inside of the database server. Is
this what you're actually doing?

If you're making client queries from a standalone C program, the libpq
API should do what you want and is amply documented.

-Doug

In response to

  • SPI_???? at 2002-11-07 18:50:49 from Tourtounis Sotiris

Browse pgsql-general by date

  From Date Subject
Next Message Cool Screen 2002-11-07 20:21:25 UNION and ORDER BY
Previous Message Robert Treat 2002-11-07 19:56:44 Re: OT: mailing list delays