Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 28F9B2E003D for ; Tue, 19 Feb 2008 08:49:07 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 75893-09 for ; Tue, 19 Feb 2008 08:48:57 -0400 (AST) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.155]) by postgresql.org (Postfix) with ESMTP id 7A24C2E003A for ; Tue, 19 Feb 2008 08:49:04 -0400 (AST) Received: by fg-out-1718.google.com with SMTP id 22so1688521fge.23 for ; Tue, 19 Feb 2008 04:49:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=rYCsfg59V/7+AKTSXNq5eDS8jYDqOgLIj/NQoYyCB/E=; b=Atbs/H6U9zdHYudYaLtIvDIuB5HOCe6I0ILbKxP/Boan1/kYNblhMKRjvgc7/Vgr9IlPDOnEsdWLGNmh/8ZjMVMWZ++FeiGYZzsrKzaUOhXhETppT3bMonEnXa/S2to4Irgwz58diLtTJwH1au1dXYJ2xHuSWvhg31wwwKSzUWY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=KpCi0llMOUak6h7dFYli5fxQEXM3BjhcqFAm5PuOr/17waTiF3ZqnHFMAzKg7eGLU0twJWuDC8mjCunmBpY/Da8pD3TS3/ela9sFZdPUq7azr3yqrEll+Yl8MVENiZ0dQvKF3pNYFipQBAGE7Gz0v9va3rDqRDIExEWQFnreHzo= Received: by 10.82.108.9 with SMTP id g9mr12246428buc.37.1203425342179; Tue, 19 Feb 2008 04:49:02 -0800 (PST) Received: by 10.82.112.18 with HTTP; Tue, 19 Feb 2008 04:49:02 -0800 (PST) Message-ID: <36af4bed0802190449m247ee430ge37bee5acdcb6e13@mail.gmail.com> Date: Tue, 19 Feb 2008 18:19:02 +0530 From: "Robins Tharakan" To: pgsql-sql Subject: UPDATE with ORDER BY MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_14902_17182007.1203425342168" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/149 X-Sequence-Number: 30240 ------=_Part_14902_17182007.1203425342168 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I know this kind of a question is asked earlier, but I couldn't find an answer there (in the previous round of posting). Instead of wanting to update the first record in an UPDATE .. ORDER BY condition, (because of triggers that act downward) what I want is that all records be updated, but in a given order, for e.g. ascending on date. Is a FOR LOOP my best bet or is something like UPDATE .... ORDER BY in the offing ? Thanks *Robins* ------=_Part_14902_17182007.1203425342168 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi,

I know this kind of a question is asked earlier, but I couldn't find an answer there (in the previous round of posting).

Instead of wanting to update the first record in an UPDATE .. ORDER BY condition, (because of triggers that act downward) what I want is that all records be updated, but in a given order, for e.g. ascending on date.

Is a FOR LOOP my best bet or is something like UPDATE .... ORDER BY in the offing ?

Thanks
Robins
------=_Part_14902_17182007.1203425342168--