From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Rory Campbell-Lange <rory(at)campbell-lange(dot)net> |
Cc: | Sim Zacks <sim(at)compulab(dot)co(dot)il>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: row constructors |
Date: | 2009-02-12 17:35:43 |
Message-ID: | b42b73150902120935o52ed716aubc290d20b1d290c9@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Feb 12, 2009 at 11:38 AM, Rory Campbell-Lange
<rory(at)campbell-lange(dot)net> wrote:
> On 12/02/09, Merlin Moncure (mmoncure(at)gmail(dot)com) wrote:
>> On Thu, Feb 12, 2009 at 5:03 AM, Sim Zacks <sim(at)compulab(dot)co(dot)il> wrote:
>> > Never mind. I found an old post.
>> > I just needed to do:
>> > insert into a1 select (f2).* from a2;
>> >
>> > I didn't find it the first time I searched because I was looking for row
>> > constructors, and the post I found used the term composite value.
>>
>> I'm scheming to get that fixed. The main reason is that while the
>> insert workaround works, there is no similar workaround for 'update'.
>
> Do you mean that the currently unsupported behaviour
>
> UPDATE accounts SET (contact_last_name, contact_first_name) =
> (SELECT last_name, first_name FROM salesmen
> WHERE salesmen.id = accounts.sales_id);
no, but that would also be nice. I mean,
update account set account = (123, 'a', 1)::account where account_id = 123;
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Rory Campbell-Lange | 2009-02-12 17:39:49 | Re: Update table with random values from another table |
Previous Message | Steve Crawford | 2009-02-12 17:02:12 | Re: Killing OIDs |