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