Re: user defined C-lang pg function bug

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: user defined C-lang pg function bug
Дата
Msg-id 15048.1163783348@sss.pgh.pa.us
обсуждение исходный текст
Ответ на user defined C-lang pg function bug  ("James Moss" <jpmoss@gmail.com>)
Список pgsql-general
"James Moss" <jpmoss@gmail.com> 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

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

Предыдущее
От: "James Moss"
Дата:
Сообщение: user defined C-lang pg function bug
Следующее
От: "Ardian Xharra"
Дата:
Сообщение: Re: Why the data changes it's value by itself!