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

Re: partial PGresult in pgsql v8.2rc1

From: Igor Shevchenko <igor(at)carcass(dot)ath(dot)cx>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: partial PGresult in pgsql v8.2rc1
Date: 2006-12-04 09:07:20
Message-ID: 200612041107.20612.igor@carcass.ath.cx (view raw or flat)
Thread:
Lists: pgsql-bugs
On Friday 01 December 2006 19:52, you wrote:
> Igor Shevchenko <igor(at)carcass(dot)ath(dot)cx> writes:
> > 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.
>
> PGconn is not an exported struct, and so what you are doing is unsupported,
> but I'll bet your app was compiled against the wrong version of
> libpq-int.h.

Thanks Tom, that was it. An old libpq-int.h was compiled into a precompiled 
header.

The reason I'm using libpq-int.h is that I can use SELECT-ed data from 
not-yet-complete queries, and this is very useful for long searches which 
yeld data from time to time. The only other approach I can think of, cursor 
open / fetch, causes bidirectional network traffic and it's not very 
efficient when there are many immediate results. OFC I understand that using 
internal libpq stuff means I'm on my own, so I was thinking will you accept a 
patch which would allow libpq provide data from incomplete queries ? I've 
asked about this before, your statement was that this breaks the consistency, 
but sometimes it doesn't really matter, e.g. with searches.

-- 
Best Regards,
Igor Shevchenko

In response to

pgsql-bugs by date

Next:From: Chris HamptonDate: 2006-12-04 19:32:54
Subject: pgAdmin doesn't support second monitor
Previous:From: tomasDate: 2006-12-04 05:19:13
Subject: Re: BUG #2805: restore backup

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