Re: postgres session termination
От | John DeSoi |
---|---|
Тема | Re: postgres session termination |
Дата | |
Msg-id | 605FE0FE-7340-11D9-B045-000A95B03262@pgedit.com обсуждение исходный текст |
Ответ на | postgres session termination ("Rick Schumeyer" <rschumeyer@ieee.org>) |
Ответы |
Re: postgres session termination
|
Список | pgsql-general |
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 script. My question is, > > when does my Postgres session end? Is there a timeout? > > > > Of course, if this is a really bad way to do this, I’m willing to > > learn a better way! 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. I think phpPgAdmin (http://phppgadmin.sourceforge.net/) uses option 2. You could download the source and see how they implement the table browser. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL
В списке pgsql-general по дате отправления: