Re: problem with using fetch and a join. - Mailing list pgsql-novice

From Noel
Subject Re: problem with using fetch and a join.
Date
Msg-id 3E24B557.1090303@med.monash.edu.au
Whole thread Raw
In response to Re: problem with using fetch and a join.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
Hi Tom,

I'm also having problems with fecthing and moving backwards within a view.
ie. (comparison_region_protein is a view)

int result = stmt.executeUpdate("declare test cursor for select id from " +
                    "comparison_region_protein where db_db_comparison = 1 order by id");
I can move and fetch forward, but i can't fetch or move backwards. Is this because of the reasons metioned before? Is there a work around?

Many thanks
Noel


Tom Lane wrote:
Noel Faux <Noel.Faux@med.monash.edu.au> writes: 
Many thanks for the tip. Yes adding the order by (id) to the statement 
allowed the FETCH BACKWARD to work. Is there any reason why the FETCH 
BACKWARD statement for such a join not to be supported in the future?   
If someone wants to make it happen ... my take is that actually making
it work in all cases would be lots more trouble than it's worth.  I'd
settle for producing an error message in place of a wrong answer.
		regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

pgsql-novice by date:

Previous
From: Hans Deragon
Date:
Subject: Upgrading to RH8.0 causes: "An old version of the database format was found."
Next
From: "Jason S. Friedman"
Date:
Subject: mod_perl/dbi/apache query will not finish