dbTalk Databases Forums  

[BUGS] BUG #1304: update does not honor order of subselect

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1304: update does not honor order of subselect in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
PostgreSQL Bugs List
 
Posts: n/a

Default [BUGS] BUG #1304: update does not honor order of subselect - 11-02-2004 , 02:14 PM







The following bug has been logged online:

Bug reference: 1304
Logged by: Brendan Fagan

Email address: bfagan (AT) harthosp (DOT) org

PostgreSQL version: 7.3.6

Operating system: RedHat ES 3

Description: update does not honor order of subselect

Details:

SQL Update command does not follow the order of a WHERE field IN subselect.

In the following code, I try to reset the order of rows in a column by
updating an order field. Update does not honor the order of output form the
subselect.

create temp sequence foo increment 1 minvalue 0 start 0;

select setval('foo', 0);

update nav_content_structure
set nav_cannister_ord_num = nextval('foo')
where nav_content_id in (
select s.nav_content_id
from nav_content_structure s,
nav_content c
where s.nav_content_tie_id = 2624
and s.nav_cannister_id is not null
and c.nav_content_id = s.nav_content_id
order by s.nav_cannister_id, c.nav_content_title )
and nav_content_tie_id = 2624


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly

Reply With Quote
  #2  
Old   
Peter Eisentraut
 
Posts: n/a

Default Re: [BUGS] BUG #1304: update does not honor order of subselect - 11-03-2004 , 09:30 AM






PostgreSQL Bugs List wrote:
Quote:
SQL Update command does not follow the order of a WHERE field IN
subselect.
What could possibly have given you the idea that it should?

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.