Re: SPI_???? - Mailing list pgsql-general

From Doug McNaught
Subject Re: SPI_????
Date
Msg-id m38z05xhtr.fsf@varsoon.wireboard.com
Whole thread Raw
In response to SPI_????  (Tourtounis Sotiris <tourtoun@csd.uoc.gr>)
List pgsql-general
Tourtounis Sotiris <tourtoun@csd.uoc.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

pgsql-general by date:

Previous
From: Robert Treat
Date:
Subject: Re: OT: mailing list delays
Next
From: Cool Screen
Date:
Subject: UNION and ORDER BY