Re: postgres session termination

Поиск
Список
Период
Сортировка
Искать
От
Ragnar Hafstað
Тема
Re: postgres session termination
Дата
Msg-id
1107164820.27081.19.camel@localhost.localdomain
Ответ на
Список
Дерево обсуждения
postgres session termination "Rick Schumeyer" <rschumeyer@ieee.org>
Re: postgres session termination Ragnar Hafstað <gnari@simnet.is>
Re: postgres session termination Paul Tillotson <pntil@shentel.net>
Re: postgres session termination Richard Huxton <dev@archonet.com>
Re: postgres session termination Alban Hertroys <alban@magproductions.nl>
Re: postgres session termination John DeSoi <desoi@pgedit.com>
Re: postgres session termination Alban Hertroys <alban@magproductions.nl>
Re: postgres session termination Scott Marlowe <smarlowe@g2switchworks.com>
Re: postgres session termination Ragnar Hafstað <gnari@simnet.is>
Re: postgres session termination Scott Marlowe <smarlowe@g2switchworks.com>
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 after the initial query.
>
> 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?

in normal php context, the generation of each web page should
be considered a separate database session.

there is no garantee that the 'next page' request from the user gets
the same database connection, even if you use connection pooling.

you can use LIMIT and OFFSET to do what you want. 

if your rows are ordered by a unique key, and you only
have to browse forward, you can do:
  SELECT * from table where key > ?
where the '?' is last value retrieved.

gnari


В списке pgsql-general по дате отправления
От: Troels Arvin
Дата:
Сообщение: Re: Dynamic SQL
От: Frans
Дата:
FAQ