Possible feature request

From: Brian Hurt <bhurt(at)janestcapital(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Possible feature request
Date: 2007-07-25 19:26:12
Message-ID: 46A7A3D4.6090206@janestcapital.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I'm not sure if this is the right venue for this- if it isn't, I apologize.

But a feature that I'd like to see is the ability to put an 'as' alias
on the target of an update statement.

I find myself often writing statements like:
UPDATE
some_really_long_table_name
SET
col1 = some_value,
col2 = some_other_value
FROM
some_other_really_long_table_name AS table2
WHERE
some_really_long_table_name.col3 = table2.col3
AND some_really_long_table_name.col4 = table2.col4
;

What I'd like to write is:
UPDATE
some_really_long_table_name AS table1
SET
col1 = some_value,
col2 = some_other_value
FROM
some_other_really_long_table_name AS table2
WHERE
table1.col3 = table2.col3
AND table1.col4 = table2.col4
;

Is this possible? Not for 8.3, obviously, but maybe for 8.4?

Brian

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2007-07-25 19:27:24 Re: Machine available for community use
Previous Message Hannes Eder 2007-07-25 19:12:31 Re: [HACKERS] msvc, build and install with cygwin in the PATH