Re: facing problem in outparameters in c

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: facing problem in outparameters in c
Дата
Msg-id 2605285663d506f6eec3f0adde25fd251df80227.camel@cybertec.at
обсуждение исходный текст
Ответ на facing problem in outparameters in c  (Mahesh Bodepati <mahesh.bodepati@Xius.com>)
Ответы Re: facing problem in outparameters in c  (Mahesh Bodepati <mahesh.bodepati@Xius.com>)
Список pgsql-general
On Wed, 2020-10-28 at 04:57 +0000, Mahesh Bodepati wrote:
> Actually i am calling a postgres function by using c language  which  description
>  is defined in database side .when iam calling a postgres function by passing input
>  and output parameters after excution of function in database side i need output
> data in correcsponding  output parameters but iam not getting output like that.

Right; output parameters in a function are columns in the result set.

>  i am getting total output data in response pointer.if iam getting total data
>  in response pointer it is hard to figure out which data  is for which output parameter.

No, that is very simple.  You can call PQfnumber on the result set to find which
position in the result set belongs to a certain parameter name.

See https://www.postgresql.org/docs/current/libpq-exec.html#LIBPQ-EXEC-SELECT-INFO

>  can you please check once attached two text files.

I looked, and the C code is unreadable.
You seem to be mixing embedded SQL and libpq calls, which you shouldn't.
There is great value in a consistent indentation style.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




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

Предыдущее
От: Mahesh Bodepati
Дата:
Сообщение: Re: facing problem in outparameters in c
Следующее
От: Mahesh Bodepati
Дата:
Сообщение: Re: facing problem in outparameters in c