Re: extension for sql update

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Susanne Ebrecht <miracee(at)miracee(dot)de>, pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: extension for sql update
Date: 2006-07-27 13:17:20
Message-ID: 6000.1154006240@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Tom Lane wrote:
>> UPDATE mytab SET (foo, bar, baz) =
>> (SELECT alpha, beta, gamma FROM othertab WHERE key = mytab.key);

> That UPDATE example is interesting because I remember when using
> Informix that I had to do a separate SELECT statement for each UPDATE
> column I wanted to update. I didn't realize that you could group
> columns and assign them from a single select --- clearly that is a
> powerful syntax we should support some day.

No question. The decision at hand is whether we want to look like
we support it, when we don't yet. I'd vote not, because I think the
main use-case for the row-on-the-left syntax is exactly this, and
so I fear people will just get frustrated if they see it in the
syntax synopsis and try to use it.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-07-27 13:28:05 Re: extension for sql update
Previous Message Bruce Momjian 2006-07-27 13:11:48 Re: extension for sql update

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-07-27 13:20:21 Re: LDAP lookup of connection parameters
Previous Message Bruce Momjian 2006-07-27 13:11:48 Re: extension for sql update