Search Postgresql Archives

Re: user defined C-lang pg function bug

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

 



"James Moss" <jpmoss@xxxxxxxxx> writes:
> I could use a helpful suggestion or two as to why the following is
> occuring or more to the matter, how I might work around it.  Certainly
> appears to be a bug or some sort of misunderstanding on my part.

The content of a text datum is not guaranteed null-terminated, hence
you can't just take VARDATA(a) as being a C string.  The cleanest way
to convert to C string if you need to is to call textout() --- look
around in the sources for examples to copy.

			regards, tom lane


[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