pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robins Tharakan <tharakan@gmail.com>
To: pgsql-sql <pgsql-sql@postgresql.org>
Subject: UPDATE with ORDER BY
Date: Tue, 19 Feb 2008 18:19:02 +0530
Message-ID: <36af4bed0802190449m247ee430ge37bee5acdcb6e13@mail.gmail.com> (raw)

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*

view thread (6+ messages)

Message-ID: <36af4bed0802190449m247ee430ge37bee5acdcb6e13@mail.gmail.com>
Permalink:  ../36af4bed0802190449m247ee430ge37bee5acdcb6e13@mail.gmail.com/
Also on:    postgresql.org/message-id/36af4bed0802190449m247ee430ge37bee5acdcb6e13@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tharakan@gmail.com
  Subject: Re: UPDATE with ORDER BY
  In-Reply-To: <36af4bed0802190449m247ee430ge37bee5acdcb6e13@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox