Re: Why is UPDATE with column-list syntax not implemented

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: AK <alkuzo(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Why is UPDATE with column-list syntax not implemented
Date: 2013-11-22 20:15:46
Message-ID: 24731.1385151346@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

AK <alkuzo(at)gmail(dot)com> writes:
> 9.3 documentation says:
> According to the standard, the column-list syntax should allow a list of
> columns to be assigned from a single row-valued expression, such as a
> sub-select:

> UPDATE accounts SET (contact_last_name, contact_first_name) =
> (SELECT last_name, first_name FROM salesmen
> WHERE salesmen.id = accounts.sales_id);
> This is not currently implemented the source must be a list of independent
> expressions.

> Why is this not implemented? Is it considered inconvenient to use, or
> difficult to implement. or not important enough, or some other reason?

It's difficult to implement. You'd need to do some significant
restructuring of the way UPDATE is handled. Probably someone will
attempt it at some point.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2013-11-22 20:26:22 Re: [GENERAL] pg_upgrade ?deficiency
Previous Message Kevin Grittner 2013-11-22 20:14:03 Re: [GENERAL] pg_upgrade ?deficiency