| From: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
|---|---|
| To: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
| Cc: | Abbas Butt <abbas(dot)butt(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: varattno remapping |
| Date: | 2013-12-25 09:23:07 |
| Message-ID: | 52BAA3FB.2000206@2ndquadrant.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 12/24/2013 11:17 PM, Dean Rasheed wrote:
> I don't think this bit is quite right.
>
> It's not correct to assume that all the view columns are simple
> references to columns of the base relation --- auto-updatable views
> may now contain a mix of updatable and non-updatable columns, so some
> of the view columns may be arbitrary expressions.
Ah - it looks like I'd checked against 9.3 and missed the relaxation of
those requirements.
> There is already code in rewriteTargetView() that does something very
> similar (to the whole parsetree, rather than just the returning list)
> with 2 function calls:
Copying the view tlist and then adjusting it is a much smarter way to do
it. I should've seen that the pull-up code could be adapted to deal with
the RETURNING list, so thankyou.
It's a cleaner way to do it.
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | MauMau | 2013-12-25 11:40:18 | Re: [bug fix] "pg_ctl stop" times out when it should respond quickly |
| Previous Message | Etsuro Fujita | 2013-12-25 08:50:00 | Re: Fix typo in src/backend/utils/mmgr/README |