Re: The connection to the server was lost. Attempting reset: Failed.

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: The connection to the server was lost. Attempting reset: Failed.
Дата
Msg-id
3613.1570724058@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
The connection to the server was lost. Attempting reset: Failed. Yessica Brinkmann <yessica.brinkmann@gmail.com>
Re: The connection to the server was lost. Attempting reset: Failed. Alban Hertroys <haramrae@gmail.com>
Re: The connection to the server was lost. Attempting reset: Failed. Yessica Brinkmann <yessica.brinkmann@gmail.com>
Re: The connection to the server was lost. Attempting reset: Failed. Yessica Brinkmann <yessica.brinkmann@gmail.com>
Re: The connection to the server was lost. Attempting reset: Failed. Yessica Brinkmann <yessica.brinkmann@gmail.com>
Re: The connection to the server was lost. Attempting reset: Failed. Tom Lane <tgl@sss.pgh.pa.us>
Re: The connection to the server was lost. Attempting reset: Failed. Yessica Brinkmann <yessica.brinkmann@gmail.com>
Re: The connection to the server was lost. Attempting reset: Failed. Yessica Brinkmann <yessica.brinkmann@gmail.com>
Re: The connection to the server was lost. Attempting reset: Failed. Jaime Soler <jaime.soler@gmail.com>
Re: The connection to the server was lost. Attempting reset: Failed. Yessica Brinkmann <yessica.brinkmann@gmail.com>
Yessica Brinkmann  writes:
> I really thought a lot, but I don't understand why but the function fails
> after the expression is executed:
> appendStringInfo (& cols, "% s a.attnum =% d", (i> 0? "OR": ""), idxcd->
> varattno [i]);

I think you're probably shooting yourself in the foot here:

            /* pfree() the memory allocated for the previous candidate. FIXME: Avoid
            * meddling with the internals of a StringInfo, and try to use an API.
            */
            if( cols.len > 0 )
            {
                pfree( cols.data );
                cols.data = NULL;
            } /*IF col.len>0*/

Don't do that, use resetStringInfo() instead.

			regards, tom lane


В списке pgsql-general по дате отправления
От: Yessica Brinkmann
Дата:
От: Alban Hertroys
Дата:
FAQ