From: Pierre-Frédéric Caillaud <lists@boutiquenumerique.com>
To: pgsql-performance@postgresql.org
Subject: Re: Restricting Postgres
Date: Thu, 04 Nov 2004 23:00:14 +0100
Message-ID: <opsgyneoj4cq72hf@musicbox> (raw)
In-Reply-To: <418A98C0.9010107@ymogen.net>
References: <003301c4c29a$f052d910$8300a8c0@solent>
<opsgyi89iccq72hf@musicbox>
<418A98C0.9010107@ymogen.net>
> 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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: lists@boutiquenumerique.com
Subject: Re: Restricting Postgres
In-Reply-To: <opsgyneoj4cq72hf@musicbox>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox