Re: deleting rows in specific order

From: Frank Bax <fbax(at)sympatico(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: deleting rows in specific order
Date: 2006-10-09 22:00:33
Message-ID: 5.2.1.1.0.20061009175632.057feec0@pop6.sympatico.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2006-10-09 22:09:00 Re: [HACKERS] timestamp subtraction (was Re: formatting intervals with to_char)
Previous Message Jim C. Nasby 2006-10-09 21:54:59 Re: [HACKERS] timestamp subtraction (was Re: formatting intervals with to_char)