BUG #2849: Erroronous UPDATE syntax in documentation - Mailing list pgsql-bugs

From Gurjeet Singh
Subject BUG #2849: Erroronous UPDATE syntax in documentation
Date
Msg-id 200612211143.kBLBhieV000970@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #2849: Erroronous UPDATE syntax in documentation  ("Gurjeet Singh" <singh.gurjeet@gmail.com>)
Re: BUG #2849: Erroronous UPDATE syntax in documentation  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      2849
Logged by:          Gurjeet Singh
Email address:      singh.gurjeet@gmail.com
PostgreSQL version: 8.2.0
Operating system:   Windows
Description:        Erroronous UPDATE syntax  in documentation
Details:

The documentation at

http://www.postgresql.org/docs/8.2/interactive/rules-views.html#AEN38727

illustrates the examples using wrong syntax of UPDATE command. The FROM
clause is missing; if the FROM clause and the appropriate table is added to
the query, it works fine.

Sample session:

postgres=# create table t1( a int, b int );
CREATE TABLE
postgres=# create table t2( a int, b int );
CREATE TABLE
postgres=# update t1 set b = t2.b where t1.a = t2.a;
ERROR:  missing FROM-clause entry for table "t2"
LINE 1: update t1 set b = t2.b where t1.a = t2.a;
                          ^
postgres=# update t1 set b = t2.b from t2 where t1.a = t2.a;
UPDATE 0
postgres=#

pgsql-bugs by date:

Previous
From: "Tony Marston"
Date:
Subject: BUG #2848: information_schema.key_column_usage does not work
Next
From: "Tony Marston"
Date:
Subject: BUG #2850: Cannot select from information_schema.schemat