Thanks for all the feedback. Please find attached a version which prints "[none]" as the default value, "[local]" for a socket, and otherwise whatever pg_getnameinfo_all spits out. I cleaned up the coding, respected padding, removed the family checks, and expanded the docs a tiny bit to give the reader more context as to what "local address" means. I also looked into alternatives to the term "local address" but that still seems the most correct and commonly used term.