From: | "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #1304: update does not honor order of subselect |
Date: | 2004-11-02 19:59:31 |
Message-ID: | 20041102195931.232177399EA@www.postgresql.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
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
From | Date | Subject | |
---|---|---|---|
Next Message | ssinger | 2004-11-02 21:02:55 | Re Some patches to enhance the contrib build |
Previous Message | Ralph Heinkel | 2004-11-02 17:22:19 | rules ON INSERT |