This patch makes \d on tables and views sort fk constraints, triggers and rules alphabetically in the output. This makes it the same as for indexes and stops the irritating random or reverse ordering it currently has.
Chris