| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Query::targetList and RETURNING |
| Date: | 2009-11-10 14:38:59 |
| Message-ID: | 27879.1257863939@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi> writes:
> While working on writeable CTEs, I noticed I have to special-case the
> output of a Query node frequently because in INSERT/UPDATE/DELETE query
> targetList is the target list which is used for modifying the result
> relation and returningList is the output of that Query. However, this
> is different from SELECT where targetList actually is the output of that
> Query node. Attached is a patch which avoids this special-casing by
> making Query's targetList always be the output target list. The target
> list for the result relation is stored separately. The patch needs a
> bit more work but I'll be glad to do it if people think this is useful.
This doesn't really seem like a good idea from here. You're changing
a decision that has something like twenty years' standing in the code,
for no real gain. AFAICS this is just going to move the special cases
from point A to point B.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Simon Riggs | 2009-11-10 14:39:54 | Re: Parsing config files in a directory |
| Previous Message | Bruce Momjian | 2009-11-10 14:23:16 | Re: plpgsql EXECUTE will not set FOUND |