No JOINs in UPDATE ... FROM? - Mailing list pgsql-sql

From Josh Berkus
Subject No JOINs in UPDATE ... FROM?
Date
Msg-id 3AE85E1E.2D39D02D@agliodbs.com
Whole thread Raw
Responses random rows  (Jie Liang <jliang@ipinc.com>)
Re: No JOINs in UPDATE ... FROM?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Folks,
In 7.1 RC2, I've been trying to use the following JOIN syntax:

UPDATE assignments SET status = -1
FROM assignments JOIN orders ON assignments.order_usq = orders.usq
WHERE orders.status = -1;
However, I get an error of "Relation assignments referenced twice in
query."  
Now, I can (and have) re-phrase the query so that PostgreSQL will
accept it.  However, I was under the impression that the above was
standard SQL92.  Am I mistaken?  Or is this form something that just
hasn't been implemented yet?
                -Josh

-- 
______AGLIO DATABASE SOLUTIONS___________________________                                       Josh Berkus  Complete
informationtechnology      josh@agliodbs.com   and data management solutions       (415) 565-7293  for law firms, small
businesses      fax  621-2533   and non-profit organizations.       San Francisco
 


pgsql-sql by date:

Previous
From: "Kenn Thompson"
Date:
Subject: Re: realising a counter in an pgpsql-trigger
Next
From: Jie Liang
Date:
Subject: random rows