partial PGresult in pgsql v8.2rc1

Поиск
Список
Период
Сортировка
От Igor Shevchenko
Тема partial PGresult in pgsql v8.2rc1
Дата
Msg-id 200612010214.10400.igor@carcass.ath.cx
обсуждение исходный текст
Ответы Re: partial PGresult in pgsql v8.2rc1  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Hi All,

I've been using partial PGresult-s since pgsql v7.4, and one of "signs" that
it's there (after a "read" event on a non-blocking tcp connection to pgsql +
a call to PQconsumeInput) is a check: "pgconn->result != NULL", where pgconn
is a pointer to a PGconn object. Looks like in v8.2rc1, the "result" can have
wrong pointers - my test app dies with the following trace:

#0  0x00e065a8 in PQntuples (res=0x11f) at fe-exec.c:2063
#1  0x080a1a75 in pg::db::can_read (this=0xa3b2f78) at pgdb.cpp:197

where: pgdb.cpp:

197:    if ( conn->result != NULL && PQntuples ( conn->result ) ) {

fe-exec.c:2063:

int
PQntuples(const PGresult *res)
{
        if (!res)
                return 0;
2063:        return res->ntups;
}


Looks like the "result" has an invalid pointer ? Address=0x11f is unlikely.

--
Best Regards,
Igor Shevchenko

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

Предыдущее
От: "Mischa Sandberg"
Дата:
Сообщение: Bug? change from 8.0 to 8.2rc1 in checking default expressions
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #2798: Obsolete tiemzone data included