From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(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:11:48 |
Message-ID: | 200607271311.k6RDBmH27064@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
> much anything that can generate a row. The patch as you have it
> provides nothing more than syntactic sugar for something people can do
> anyway. The reason people want this syntax is that they expect to be
> able to write, say,
>
> UPDATE mytab SET (foo, bar, baz) =
> (SELECT alpha, beta, gamma FROM othertab WHERE key = mytab.key);
>
> and with something like that you can't break apart the row-valued
> expression in the grammar. So in reality the feature has to propagate
> much further into the backend than this.
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.
--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-07-27 13:17:20 | Re: extension for sql update |
Previous Message | Simon Riggs | 2006-07-27 12:59:06 | Re: Forcing wal rotation |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-07-27 13:17:20 | Re: extension for sql update |
Previous Message | Simon Riggs | 2006-07-27 13:08:52 | WAL file rotation/ XLog Switch |