Re: Ajax/PostgreSQL - Mailing list pgsql-general

From John Jawed
Subject Re: Ajax/PostgreSQL
Date
Msg-id a9eb35850608051815w5b73553fye88257d2951ae88f@mail.gmail.com
Whole thread Raw
In response to Ajax/PostgreSQL  (Paul M Foster <paulf@quillandmouse.com>)
List pgsql-general
If you take a peek at the CVS version of phpPgAdmin, you will see the
"autocomplete" functionality for foreign keyed columns when doing
"insert row" or "edit row". You can easily get started with that by
using the pagila database and trying to insert some data into
film_category.

$ cvs -d:pserver:anonymous@phppgadmin.cvs.sourceforge.net:/cvsroot/phppgadmin
login

$ cvs -z3 -d:pserver:anonymous@phppgadmin.cvs.sourceforge.net:/cvsroot/phppgadmin
co -P webdb

Pagila: http://pgfoundry.org/frs/download.php/919/pagila-0.8.0.zip

Files of interest is "autocomplete.php", this was part of my Google SoC project.

Regards,
John

On 8/5/06, Paul M Foster <paulf@quillandmouse.com> wrote:
> I'm doing some massive (internal company) applications using PHP, which
> query extensive PostgreSQL tables. This is fine, but obviously it often
> requires multiple web pages to get something done. Supposedly, AJAX
> promises to make web pages more interactive. But from what I understand,
> I'd have to have bindings from Javascript into PostgreSQL to make this work.
>
> Here's an example: The user wants to enter a bill (accounts payable)
> into the system. He first has to pick a vendor. Normally, this would
> entail a PHP page that generates a PostgreSQL query. The user would then
> get a second page with various vendor information (like number of due
> days for that vendor), and various other payable info. But wouldn't it
> be nice to have vendor information filled in on the original page,
> directly after the user picks a vendor? Theoretically, AJAX might allow
> something like this. But from what I can see, it would require
> PostgreSQL bindings in Javascript, and some way to pass the data back so
> that PHP could use it.
>
> Is this even possible? Is it being worked on? Is there a different
> solution I don't know about? I can see where Javascript can alter the
> look of a page, but I can't work out how it would allow interactive use
> of a PostgreSQL table.
>
> --
> Paul M. Foster
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match
>

pgsql-general by date:

Previous
From: Tyler MacDonald
Date:
Subject: Re: Ajax/PostgreSQL
Next
From: Tom Lane
Date:
Subject: Re: Slow transfer speeds