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 w

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

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 >

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 w

Re: [GENERAL] postgres session termination

2005-01-31 Thread John DeSoi
On Jan 30, 2005, at 9:24 PM, Rick Schumeyer wrote: I’m accessing this via a php web page.  I’m 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 scri

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 v

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 Ragnar Hafstað
On Sun, 2005-01-30 at 21:24 -0500, 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 af

Re: [GENERAL] postgres session termination

2005-01-31 Thread Alban Hertroys
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 v

[GENERAL] postgres session termination

2005-01-30 Thread Rick Schumeyer
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 via a