On Thu, Jul 19, 2012 at 6:52 PM, Tom Lane <[email protected]> wrote:
>> Now I was wondering if a DELETE statement could be rewritten with the same
>> "strategy":
>
> Not at the moment. There have been discussions of allowing the same
> table name to be respecified in USING, but there are complications.
However it works.
DELETE FROM some_table USING some_table AS s
WHERE
some_table.col1 = s.col1 AND
some_table.col2 = s.col2 AND
some_table.id < s.id;
--
Sergey Konoplev
a database and software architect
http://www.linkedin.com/in/grayhemp
Jabber: [email protected] Skype: gray-hemp Phone: +79160686204
--
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql