Support UPDATE table SET(*)=... - Mailing list pgsql-hackers

From Atri Sharma
Subject Support UPDATE table SET(*)=...
Date
Msg-id CAOeZVif44gNx-uqE=qNm5FDu+LfSjK94jSm1goHMH2Fc3u1FpQ@mail.gmail.com
Whole thread Raw
Responses Re: Support UPDATE table SET(*)=...
Re: Support UPDATE table SET(*)=...
List 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

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Buffer Requests Trace
Next
From: Simon Riggs
Date:
Subject: Re: Column Redaction