Re: Postgesql lib

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Postgesql lib
Дата
Msg-id 8968.1231506938@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Postgesql lib  ("Lukas" <lukas@fmf.vtu.lt>)
Ответы Re: Postgesql lib  ("Lukas" <lukas@fmf.vtu.lt>)
Список pgsql-novice
"Lukas" <lukas@fmf.vtu.lt> writes:
>  I am trying to write simple PG Lib on C (on Linux), it is working, bus I
> have some problem with data types, maybe someone can explain me a little
> bit:

You're assuming that VARDATA() produces a null-terminated string.
It doesn't.  You either need to call textout to get a null-terminated
string, or fix the fprintf calls to pay attention to the actual
string length.

>     ats = pclose (sendmail);
>     PG_RETURN_TEXT_P( ats );

... and this part is even less likely to work.  pclose returns an
integer.

            regards, tom lane

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

Предыдущее
От: "Lukas"
Дата:
Сообщение: Postgesql lib
Следующее
От: "info"
Дата:
Сообщение: Re: How to release a transaction lock on a table