Re: Getting Out Parameter in the application using libpq

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Getting Out Parameter in the application using libpq
Дата
Msg-id b42b73150909110508o40876eackbc4a4246d97b7e82@mail.gmail.com
обсуждение исходный текст
Ответ на Getting Out Parameter in the application using libpq  (Ehsan Haq <ehsan_haq98@yahoo.com>)
Ответы Re: Getting Out Parameter in the application using libpq  (Ehsan Haq <ehsan_haq98@yahoo.com>)
Список pgsql-general
On Fri, Sep 11, 2009 at 12:31 AM, Ehsan Haq <ehsan_haq98@yahoo.com> wrote:
>
> Hi,
>    I am looking for a way to get the OUT parameters of a FUNCTION/PROCEDURE in my application (C++) using C libpq
library.I can get the result set of an OUT parameter having REFCURSOR data type through an explicit FETCH ALL from
"YYYY"but for OUT parameter of type integer/varchar I dont have a clue. Can anyone tell me how it is done or suggest
anywork around for this? 

name your cursor:  also, remember that your cursor is only good for
duration of transaction.

> Using the following code I can get the refcursor.
>
> CREATE OR REPLACE
> Function getAddresses
> (
> pName IN varchar2, outCursor refcursor

outCursor := 'outcur';

[...]

FETCH all FROM outcur;


see:
http://www.postgresql.org/docs/8.4/interactive/plpgsql-cursors.html#PLPGSQL-CURSOR-USING

merlin

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

Предыдущее
От: Andreas Wenk
Дата:
Сообщение: Re: quick survey on schema less database usage
Следующее
От: "Gauthier, Dave"
Дата:
Сообщение: constraint definition on an array column?