Re: How can I retrieve a function result?

From: Joachim Wieland <joe(at)mcknight(dot)de>
To: Luis Alberto Pérez Paz <midriasis(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How can I retrieve a function result?
Date: 2006-06-13 00:40:16
Message-ID: 20060613004016.GA4255@mcknight.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Luis,

On Mon, Jun 12, 2006 at 06:24:24PM -0500, Luis Alberto Pérez Paz wrote:
> res = PQexecParams ( conn, "select myFunction($1,$2,$3)" , 3, NULL,
> paramValues, paraLenghts, paramFormats, resultFormat);

> It's works fine, however I dont know how can I retrieve the result that
> return the FUNCTION "myFunction". "myFunction" is a postgres FUNCTION which
> returns a INT.

libpq functions for retrieving query results are described here:

http://www.postgresql.org/docs/8.1/static/libpq-exec.html#LIBPQ-EXEC-SELECT-INFO
Have you tried them and do you have a special problem with one of those? If
so, please give more detail.

Getting the result of a function does not differ from getting the result of
a regular select of a table or view.

Joachim

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John Tregea 2006-06-13 01:27:02 Re: Help with storing spatial (map coordinates) data?
Previous Message Brent Wood 2006-06-12 23:33:42 Re: Help with storing spatial (map coordinates) data?