Skip site navigation (1) Skip section navigation (2)

table aliases with updates

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: table aliases with updates
Date: 2000-08-29 23:02:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
andrew brown (andy75(at)hotmail(dot)com) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
table aliases with updates

Long Description
It appears that table aliases cannot be used in update queries for the table we are updating.

Sample Code
This doesn't work:

update table1 t1 set value1 = (select value1 from table2 t2 where t2.value2 = t1.value2)

But this does:

update table1 set value1 = (select value1 from table2 t2 where t2.value2 = table1.value2)

No file was uploaded with this report


pgsql-bugs by date

Next:From: pgsql-bugsDate: 2000-08-29 23:17:34
Subject: Cannot create tabel named 'user'
Previous:From: Tom LaneDate: 2000-08-29 22:32:31
Subject: Re: Re: [GENERAL] cannot vacuum a database !

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group