Unix Technical Forum

BUG #2849: Erroronous UPDATE syntax in documentation

This is a discussion on BUG #2849: Erroronous UPDATE syntax in documentation within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 2849 Logged by: Gurjeet Singh Email address: singh.gurjeet@gmail.com PostgreSQL version: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 11:29 AM
Gurjeet Singh
 
Posts: n/a
Default BUG #2849: Erroronous UPDATE syntax in documentation


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/i....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=#

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 11:29 AM
Gurjeet Singh
 
Posts: n/a
Default Re: BUG #2849: Erroronous UPDATE syntax in documentation

On 12/21/06, Gurjeet Singh <singh.gurjeet@gmail.com> wrote:
>
>
> 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



*** Erroneous ***



--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | yahoo }.com

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 11:30 AM
Tom Lane
 
Posts: n/a
Default Re: BUG #2849: Erroronous UPDATE syntax in documentation

"Gurjeet Singh" <singh.gurjeet@gmail.com> writes:
> http://www.postgresql.org/docs/8.2/i....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.


Well, it used to be right ;-) ... but yeah, now that add_missing_from
defaults to off we should adjust the examples. Done, thanks for the
report.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:01 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com