pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Frank Bax <fbax@sympatico.ca>
To: pgsql-sql@postgresql.org
Subject: Re: deleting rows in specific order
Date: Mon, 09 Oct 2006 18:00:33 -0400
Message-ID: <5.2.1.1.0.20061009175632.057feec0@pop6.sympatico.ca> (raw)
In-Reply-To: <Pine.LNX.4.61.0610092207210.24332@mazsola.iit.uni-miskolc. hu>

At 04:14 PM 10/9/06, Daniel Drotos wrote:
>What is the best way to do something like:
>
>delete from tablename where something order by somefield...


You cannot, because it doesn't make sense.  The "order by" clause is not 
valid on delete statement.  Queries from other processes that start while 
your delete is running will either see all the deleted rows or (perhaps) 
they will see none of them. 




view thread (6+ messages)  latest in thread

Message-ID: <5.2.1.1.0.20061009175632.057feec0@pop6.sympatico.ca>
Permalink:  ../5.2.1.1.0.20061009175632.057feec0@pop6.sympatico.ca/
Also on:    postgresql.org/message-id/5.2.1.1.0.20061009175632.057feec0@pop6.sympatico.ca

 · 

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: fbax@sympatico.ca
  Subject: Re: deleting rows in specific order
  In-Reply-To: <5.2.1.1.0.20061009175632.057feec0@pop6.sympatico.ca>

* 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