Inserting result of query into ORDERED temporary table

Поиск
Список
Период
Сортировка
От Joseph N. Hall" <
Тема Inserting result of query into ORDERED temporary table
Дата
Msg-id 3A6DAF40.BF4D00B4@5sigma.com
обсуждение исходный текст
Список pgsql-general
Something that I can do in mysql is (please excuse the Java):

      (connection.createStatement()).executeUpdate(
        "create temporary table tmp1_" + localUniqueId + " " +
        "(_index int not null auto_increment primary key) " +
        queryString
      );

Basically I'm creating a temporary table from the query contained
in queryString, "annotated" by an additional column called _index
that runs from 1 to the number of rows in the result.

I can also do this in a different way with Oracle.

I need this capability, or something like it, in order to
give client software the ability to scroll visually through large
result sets without having to send the entire result set across
the network (and potentially running the Java client out of
memory).  Once I have this temporary table I can translate
scrolling into requests for individual rows or row ranges, which
works very nicely especially when combined with a little client
side caching.

Is there a way to do this in Postgresql -- without the need to
at least partially parse the SQL in queryString?

  -joseph

Joseph N. Hall / Author, Effective Perl Programming

В списке pgsql-general по дате отправления:

Предыдущее
От: eschmid+sic@s.netic.de
Дата:
Сообщение: Re: Postgres-Book from addison-wesley?
Следующее
От: "Joseph N. Hall" <"
Дата:
Сообщение: Re: MySQL has transactions