Thanks for looking this over. I'm pretty happy with the patch as is now. I agree the INTERNAL QUERY is a nice touch. I once thought about adding "psql" into the header somehow as a kind of application_name self labelling, but I think INTERNAL QUERY will be distinct enough.
Notably, I didn't like that some of the headers said "table" and some said > "relation". I made them all say "table", although you could certainly > argue for the opposite. I originally had "table", but then it felt weird in my testing when I was describing a sequence or view it said table. So I'm a weak +1 for relation. -- Cheers, Greg
