Re: pgsql: Refactor attribute mappings used in logical tuple conversion

2019-12-18 Thread Michael Paquier
On Thu, Dec 19, 2019 at 10:23:32AM +0900, Amit Langote wrote: > On Wed, Dec 18, 2019 at 11:37 PM Tom Lane wrote: >> TBH, though, I wonder if this doesn't indicate you've put this >> function in the wrong header to begin with. Why does it belong >> in rewriteManip? Thanks for the fix! I was goin

Re: pgsql: Refactor attribute mappings used in logical tuple conversion

2019-12-18 Thread Amit Langote
On Wed, Dec 18, 2019 at 11:37 PM Tom Lane wrote: > TBH, though, I wonder if this doesn't indicate you've put this > function in the wrong header to begin with. Why does it belong > in rewriteManip? Assuming you are talking about map_variable_attnos(), it's always been in rewriteManip.c / rewrite

Re: pgsql: Refactor attribute mappings used in logical tuple conversion

2019-12-18 Thread Tom Lane
Michael Paquier writes: > Hmm. All buildfarm members are happy with this change, except > prairiedog which is picky about the part in rewriteManip.h It's not only prairiedog --- my RHEL6 workstation (gcc 4.4.7) is failing as well, and I see buildfarm member grouse is unhappy too. > In file in

Re: pgsql: Refactor attribute mappings used in logical tuple conversion

2019-12-18 Thread Michael Paquier
On Wed, Dec 18, 2019 at 07:25:49AM +, Michael Paquier wrote: > Refactor attribute mappings used in logical tuple conversion > > Tuple conversion support in tupconvert.c is able to convert rowtypes > between two relations, inner and outer, which are logically equivalent > but have a different o

Re: pgsql: Refactor attribute mappings used in logical tuple conversion

2019-12-18 Thread Michael Paquier
On Wed, Dec 18, 2019 at 08:43:47AM +0100, er wrote: > gcc (9.2.0) mutters this: > > tupconvert.c: In function ‘execute_attr_map_tuple’: > tupconvert.c:146:8: warning: unused variable ‘outnatts’ [-Wunused-variable] > 146 | int outnatts = map->outdesc->natts; > |^~~~ > > (Oth

Re: pgsql: Refactor attribute mappings used in logical tuple conversion

2019-12-17 Thread er
On 2019-12-18 08:25, Michael Paquier wrote: Refactor attribute mappings used in logical tuple conversion gcc (9.2.0) mutters this: tupconvert.c: In function ‘execute_attr_map_tuple’: tupconvert.c:146:8: warning: unused variable ‘outnatts’ [-Wunused-variable] 146 | int outnatts = map->o

pgsql: Refactor attribute mappings used in logical tuple conversion

2019-12-17 Thread Michael Paquier
Refactor attribute mappings used in logical tuple conversion Tuple conversion support in tupconvert.c is able to convert rowtypes between two relations, inner and outer, which are logically equivalent but have a different ordering or even dropped columns (used mainly for inheritance tree and parti