X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F00283A499E for ; Thu, 4 Nov 2004 22:00:01 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 41792-06 for ; Thu, 4 Nov 2004 21:59:56 +0000 (GMT) Received: from boutiquenumerique.com (boutiquenumerique.com [82.67.9.10]) by svr1.postgresql.org (Postfix) with ESMTP id BE6DA3A49A4 for ; Thu, 4 Nov 2004 21:59:56 +0000 (GMT) Received: (qmail 16256 invoked from network); 4 Nov 2004 23:00:10 +0100 Received: from unknown (HELO musicbox) (boutiquenumerique-lists@192.168.0.2) by boutiquenumerique.com with SMTP; 4 Nov 2004 23:00:10 +0100 Date: Thu, 04 Nov 2004 23:00:14 +0100 To: pgsql-performance@postgresql.org Subject: Re: Restricting Postgres References: <003301c4c29a$f052d910$8300a8c0@solent> <418A98C0.9010107@ymogen.net> From: =?iso-8859-15?Q?Pierre-Fr=E9d=E9ric_Caillaud?= Organization: =?iso-8859-15?Q?La_Boutique_Num=E9rique?= Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: In-Reply-To: <418A98C0.9010107@ymogen.net> User-Agent: Opera M2/7.54 (Linux, build 751) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/66 X-Sequence-Number: 9020 > I'm guessing (2) - PG doesn't give the results of a query in a stream. In 1- I was thinking about a cursor... but I think his problem is more like 2- In that case one can either code a special purpose server or use the following hack : In your webpage include an iframe with a Javascript to refresh it every five seconds. The iframe fetches a page from the server which brings in the new data in form of generated JavaScript which writes in the parent window. Thus, you get a very short request every 5 seconds to fetch new data, and it is displayed in the client's window very naturally. I've used this technique for another application and find it very cool. It's for selection lists, often you'll see a list of things to be checked or not, which makes a big form that people forget to submit. Thus I've replaced the checkboxes with clickable zones which trigger the loading of a page in a hidden iframe, which does appropriate modifications in the database, and updates the HTML in the parent page, changing texts here and there... it feels a bit like it's not a webpage but rather a standard GUI. Very neat. Changes are recorded without needing a submit button... I should write a framework for making that easy to do. I did not use a frame because frames suck, but iframes are convenient. Yeah, it does not work with Lynx... it needs JavaScript... but it works well.