Re: Call pstrdup() of palloc.h will change source string, please help!

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Call pstrdup() of palloc.h will change source string, please help!
Дата
Msg-id 574740.1654362329@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Call pstrdup() of palloc.h will change source string, please help!  ("mengfanjun" <meng_fan_jun@foxmail.com>)
Список pgsql-general
"=?ISO-8859-1?B?bWVuZ2Zhbmp1bg==?=" <meng_fan_jun@foxmail.com> writes:
> pstrdup() will change source "system_time( stt , ett )" to "system_time( stt " and return "system_time( stt
" whenit is called in ValidateForeignTableOptions() and CStoreGetOptions(). 

That claim is not very credible.  I'm not sure where the bug is in this
code, but the chance that it's in pstrdup is frankly zero.

According to the man page for strsep(), that function modifies the string
pointed to by its first argument.  I suspect you're failing to account
for that.  I'm also suspicious of the "// trim" code, which will misbehave
for a zero-length token.

            regards, tom lane



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Window function?
Следующее
От: John W Higgins
Дата:
Сообщение: Re: Window function?