Skip site navigation (1) Skip section navigation (2)

partial PGresult in pgsql v8.2rc1

From: Igor Shevchenko <igor(at)carcass(dot)ath(dot)cx>
To: pgsql-bugs(at)postgresql(dot)org
Subject: partial PGresult in pgsql v8.2rc1
Date: 2006-12-01 00:14:10
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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 ) ) {


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 by date

Next:From: yyangDate: 2006-12-01 08:54:08
Subject: BUG #2796: Command: Listen and Notify
Previous:From: Jeremy HaileDate: 2006-11-30 21:15:30
Subject: Re: fsync and semctl errors with 8.1.5/win32

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group