No JOINs in UPDATE ... FROM?

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема No JOINs in UPDATE ... FROM?
Дата
Msg-id 3AE85E1E.2D39D02D@agliodbs.com
обсуждение исходный текст
Ответы random rows  (Jie Liang <jliang@ipinc.com>)
Re: No JOINs in UPDATE ... FROM?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: "Kenn Thompson"
Дата:
Сообщение: Re: realising a counter in an pgpsql-trigger
Следующее
От: Jie Liang
Дата:
Сообщение: random rows