On Thu, Aug 19, 2021 at 12:12 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Yeah, exactly: conceptually that's simple, but flushing all the bugs
> out would be a years-long nightmare. It'd make all the fun we had
> with missed attisdropped checks look like a walk in the park. Unless
> somebody can figure out a way to mechanically check for mistakes,
> I don't think I want to go there.
Maybe a silly idea, but we could have some shared_preload_libraries
module with a command_utility_hook that intercept table creation and
randomize the logical column order. If we also have some GUC (assert
only if needed) to switch star expansion to physical-order rather than
logical-order, we could then use the regression test as a big hammer
to see if anything breaks. That's clearly not ideal (it would
obviously need some other hacks to avoid other breakage like \d and
other things) and not 100% coverage, but it should give some
confidence in any patch completeness.