Re: [GENERAL] postgres session termination

2005-01-31 Thread Alban Hertroys
Rick Schumeyer wrote: I think this is a common task, but Im not sure how to do it. I want to run a query that can return many records, display them 10 at a time, and be able to go forward/backward in the list. Im not concerned about the list changing after the initial query. Im accessing this via

Re: [GENERAL] postgres session termination

2005-01-31 Thread Ragnar HafstaĆ°
On Sun, 2005-01-30 at 21:24 -0500, Rick Schumeyer wrote: I think this is a common task, but Im not sure how to do it. I want to run a query that can return many records, display them 10 at a time, and be able to go forward/backward in the list. Im not concerned about the list changing after

Re: [GENERAL] postgres session termination

2005-01-31 Thread Paul Tillotson
IF you use pg_pconnect(), never close your script, and this page always shows the same data to all users, then the temp table would work, although it is not necessarily quicker than selecting ALL the rows (i.e., don't bother with a temp table at all; just run the whole select every time.) The

Re: [GENERAL] postgres session termination

2005-01-31 Thread Richard Huxton
Rick Schumeyer wrote: I think this is a common task, but I'm not sure how to do it. I want to run a query that can return many records, display them 10 at a time, and be able to go forward/backward in the list. I'm not concerned about the list changing after the initial query. I'm accessing this

Re: [GENERAL] postgres session termination

2005-01-31 Thread John DeSoi
On Jan 30, 2005, at 9:24 PM, Rick Schumeyer wrote: Im accessing this via a php web page. Im thinking that maybe the best way to do this, other than re-running the query each time, is to put the results into a temporary table. I think this will work if I never call disconnect from the php script.

Re: [GENERAL] postgres session termination

2005-01-31 Thread Alban Hertroys
John DeSoi wrote: I think there are much better ways to do this. If the result set is large, the user could be waiting a very long time. Two possibilities are (1) use a cursor or (2) use limit and offset in your select statement grab only the rows you need to display. Someone correct me if I'm

Re: [GENERAL] postgres session termination

2005-01-31 Thread Scott Marlowe
On Mon, 2005-01-31 at 09:28, Alban Hertroys wrote: John DeSoi wrote: I think there are much better ways to do this. If the result set is large, the user could be waiting a very long time. Two possibilities are (1) use a cursor or (2) use limit and offset in your select statement grab

Re: [GENERAL] postgres session termination

2005-01-31 Thread Ragnar HafstaĆ°
On Mon, 2005-01-31 at 15:38 -0600, Scott Marlowe wrote: On Mon, 2005-01-31 at 09:28, Alban Hertroys wrote: John DeSoi wrote: I think there are much better ways to do this. If the result set is large, the user could be waiting a very long time. Two possibilities are (1) use a cursor

Re: [GENERAL] postgres session termination

2005-01-31 Thread Scott Marlowe
On Mon, 2005-01-31 at 16:08, Ragnar Hafsta wrote: On Mon, 2005-01-31 at 15:38 -0600, Scott Marlowe wrote: On Mon, 2005-01-31 at 09:28, Alban Hertroys wrote: John DeSoi wrote: I think there are much better ways to do this. If the result set is large, the user could be waiting a very

[GENERAL] postgres session termination

2005-01-30 Thread Rick Schumeyer
I think this is a common task, but Im not sure how to do it. I want to run a query that can return many records, display them 10 at a time, and be able to go forward/backward in the list. Im not concerned about the list changing after the initial query. Im accessing this via a php