Search Postgresql Archives

Re: Getting Text data as C string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Montag, 12. März 2007 12:47 schrieb Denis Gasparin:
> I wrote a simple c stored procedure that accepts only one text parameter
> that i want to convert to a c string.
> The problem is that i obtain the C string correctly but with spurious
> characters at the end... I use these calls to obtain the c string:

The data in a text datum is not null terminated.  You need to call the 
function textout() to convert.  Grep the source code for examples of invoking 
it.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux