And here's another one...
I am trying to do a sequential update in a PL/Tcl function. The PG
Docs say that you can have an optional FROM clause in an UPDATE
statement, but the following yields 0 updated rows:
lbn=# update foo set pkey = b.page_id
lbn-# from bar b
lbn-# where b.page_id in (select page_id from bar);
UPDATE 0
In short, I am trying to update all rows in a table with the
results of a query. Is that possible? Here's what the docs say about
the from clause:
[ FROM fromlist ]
fromlist
A Postgres non-standard extension to allow columns from other
tables to appear in the WHERE condition.
Thanks again.