Re: varattno remapping - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: varattno remapping
Date
Msg-id 52B92E1A.1070509@2ndquadrant.com
Whole thread Raw
In response to Re: varattno remapping  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: varattno remapping
List pgsql-hackers
On 12/24/2013 02:35 PM, Craig Ringer wrote:

> So the short version: Given the RTE for a simple view with only one base
> rel and an attribute number for a col in that view, and assuming that
> the view col is a simple reference to a col in the underlying base rel,
> is there any sane way to get the attribute number for the corresponding
> col on the base rel?

So, of course, I find it as soon as I post.

map_variable_attnos(...), also in src/backend/rewrite/rewriteManip.c .

Just generate the mapping table and go.

Sorry for the noise folks.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: varattno remapping
Next
From: Abbas Butt
Date:
Subject: Re: varattno remapping