BUG #5850: UPDATE statement fails when using aliases

From: "Joshua Farray" <farray(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5850: UPDATE statement fails when using aliases
Date: 2011-01-26 18:05:40
Message-ID: 201101261805.p0QI5eWP016518@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 5850
Logged by: Joshua Farray
Email address: farray(at)gmail(dot)com
PostgreSQL version: 9.0.2
Operating system: Win7 x64
Description: UPDATE statement fails when using aliases
Details:

Make a table:
> CREATE TABLE foos
> (
> foo_id serial,
> foo_text varchar(255)
> );

Update the table using an alias:
> UPDATE foos AS t
> SET t.foo_text = '';

Expected output:
> UPDATE 0

Actual output:
> ERROR: column "t" of relation "foos" does not exist
> LINE 2: SET t.foo_text = '';
> ^

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message hubert depesz lubaczewski 2011-01-26 18:26:45 Re: BUG #5850: UPDATE statement fails when using aliases
Previous Message Tom Lane 2011-01-26 17:21:52 Re: BUG #5849: Stats Collector Frozen - Autovacuum Not Working Anymore