Re: Delete from Join - Mailing list pgsql-general

From Gwyneth Morrison
Subject Re: Delete from Join
Date
Msg-id 486CC58C.1090604@toadware.ca
Whole thread Raw
In response to Re: Delete from Join  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Responses Re: Delete from Join
List pgsql-general
Scott Marlowe wrote:
> Take a look here, in the notes section:
>
> http://www.postgresql.org/docs/8.3/interactive/sql-delete.html
>
> on the using keyword.
>
>
Thank you for your reply Scott,

I guess this is where the confusion started for me.

It says here in your reference  that the using clause is not standard but
that is fine as I am doing a subst. MS actually allows:

DELETE from table from table.....

I change the second from to a using and it works fine most of the time.

What I am actually trying to get past is:


    DELETE FROM data_table1
                using data_table2 INNER JOIN
                         data_table1  ON data_table1.fkey =
 data_table2.pkey;



Where the INNER JOIN keyword is used in the delete.

In the documentation section you cited, they refer to the from clause
in the usinglist. The from clause link there refers to select which  states
that a join keyword is valid in a from clause.

What I have found is it sometimes compiles but doesn't work.

I am just seeking verification  if it is supposed to work.

Gwyneth

pgsql-general by date:

Previous
From: lbarcala@freeresearch.org
Date:
Subject: Full text index without accents
Next
From: Sam Mason
Date:
Subject: Re: Functional index adding one