Amit Langote wrote: > The solution I came up with is to call map_variable_attnos() directly, > instead of going through map_partition_varattnos() every time, after first > creating the attribute map ourselves.
Yeah, sounds good. I added a tweak: if the tupledescs are equal, there should be no need to do any mapping. (Minor adjustment to the test: "cuarenta" means forty, so I changed the new test to say "cincuenta" instead, which means fifty). Pushed now, thanks. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services