Re: SPI - couple things (7.0.2)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SPI - couple things (7.0.2)
Дата
Msg-id 850.982966354@sss.pgh.pa.us
обсуждение исходный текст
Ответ на SPI - couple things (7.0.2)  ("Scott Muir" <wsmuir@islandnet.com>)
Список pgsql-interfaces
"Scott Muir" <wsmuir@islandnet.com> writes:
> Last night, I attempted to access the data of several TEXT parameters into a
> 'language 'C'' function I've created and got an interesting result...  on of
> the strings gets a little garbled on the end...  I haven't attempted to
> debug it yet (isoloate the behaviour; gave up; went home) but I"m wondering
> if it can be assumed that the (char *) part of the TEXT struct (VARDATA) has
> been terminated at the length specified by the (VARLEN())?? part.

TEXT data is guaranteed *not* to be null terminated.  If you are
writing code that expects it to be, you will have lots of problems.
        regards, tom lane


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

Предыдущее
От: "Scott Muir"
Дата:
Сообщение: SPI - couple things (7.0.2)
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: SPI - couple things (7.0.2)