"Lukas" <lukas(at)fmf(dot)vtu(dot)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