Re: Implementing Frontend/Backend Protocol TCP/IP

From: Raimon Fernandez <coder(at)montx(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Implementing Frontend/Backend Protocol TCP/IP
Date: 2009-10-27 13:25:59
Message-ID: C710BC5F-E384-4786-864B-73A7436E24CA@montx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-interfaces


On 27/10/2009, at 14:00, Alvaro Herrera wrote:

> Raimon Fernandez wrote:
>
>> REALbasic has plugin for PostgreSQL, but they are synchronous and
>> freeze the GUI when interacting with PG. This is not a problem
>> noramlly, as the SELECTS/UPDATES/... are fast enopugh, but sometimes
>> we need to fetch 1000, 5000 or more rows and the application stops
>> to respond, I can't have a progressbar because all is freeze, until
>> all data has come from PG, so we need a better way.
>
> If you need to fetch large numbers of rows, perhaps it would be better
> to use a cursor and fetch a few at a time, moving the progress bar in
> the pauses. So instead of
>
> SELECT * FROM sometab;
>
> you would o
> DECLARE foo CURSOR FOR SELECT * FROM sometab;
>
> and then, repeatedly,
> FETCH 50 FROM foo
>
> Until there are no more rows.
>
> This can still freeze your app in certain cases, but it will be
> probably
> a lot better than what you currently have. And it will be MUCH
> easier/
> cheaper to do than working with the FE/BE protocol yourself.

Yes, I'm aware of this possibility but it's a lot of extra work also.

The initial idea of TCP/IP still remains in my brain ...

:-)

thanks,

raimon

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Raimon Fernandez 2009-10-27 13:38:15 Re: Implementing Frontend/Backend Protocol TCP/IP
Previous Message Alvaro Herrera 2009-10-27 13:00:09 Re: Implementing Frontend/Backend Protocol TCP/IP

Browse pgsql-interfaces by date

  From Date Subject
Next Message Raimon Fernandez 2009-10-27 13:38:15 Re: Implementing Frontend/Backend Protocol TCP/IP
Previous Message Alvaro Herrera 2009-10-27 13:00:09 Re: Implementing Frontend/Backend Protocol TCP/IP