Re: [HACKERS] Status report: long-query-string changes

Поиск
Список
Период
Сортировка
От Leon
Тема Re: [HACKERS] Status report: long-query-string changes
Дата
Msg-id 37DB9892.2711763E@udmnet.ru
обсуждение исходный текст
Ответ на Re: [HACKERS] Status report: long-query-string changes  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Status report: long-query-string changes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:

> 
> If you're looking at the "literal" buffer, that would need to be made
> expansible, but there's not much point until flex's internal stuff is
> fixed.
> 
> 

Look at this piece of code. It seems that when myinput() had been called
once, for the second time it will return 0 even if string isn't
over yet. Parameter 'max' is 8192 bytes on my system. So the query is 
simply truncated to that size.

#ifdef FLEX_SCANNER
/* input routine for flex to read input from a string instead of a file */
static int
myinput(char* buf, int max)
{int len, copylen;
if (parseCh == NULL){    len = strlen(parseString);    if (len >= max)        copylen = max - 1;    else        copylen
=len;    if (copylen > 0)        memcpy(buf, parseString, copylen);    buf[copylen] = '\0';    parseCh = parseString;
return copylen;}else    return 0; /* end of string */
 
}
#endif /* FLEX_SCANNER */

-- 
Leon.
-------
He knows he'll never have to answer for any of his theories actually 
being put to test. If they were, they would be contaminated by reality.



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

Предыдущее
От: Gabriel Akos
Дата:
Сообщение: Possible bug...
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Status report: long-query-string changes