Support UPDATE table SET(*)=...

From: Atri Sharma <atri(dot)jiit(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Support UPDATE table SET(*)=...
Date: 2014-10-15 08:02:56
Message-ID: CAOeZVif44gNx-uqE=qNm5FDu+LfSjK94jSm1goHMH2Fc3u1FpQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi All,

Please find attached a patch which implements support for UPDATE table1
SET(*)=...
The patch supports both UPDATE table SET(*)=(a,b,c) and UPDATE table1
SET(*)=(SELECT a,b,c FROM...).
It solves the problem of doing UPDATE from a record variable of the same
type as the table e.g. update foo set (*) = (select foorec.*) where ...;

The design is simple. It basically expands the * in transformation stage,
does the necessary type checking and adds it to the parse tree. This allows
for normal execution for the rest of the stages.

Thoughts/Comments?

Regards,

Atri

Attachment Content-Type Size
updatestar_ver1.patch application/x-download 11.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2014-10-15 08:04:35 Re: Column Redaction
Previous Message Simon Riggs 2014-10-15 07:49:57 Re: Buffer Requests Trace