I remember a thread about pretty-print functions. Are those used? This is probably the best place to put the fix, since they already munge things for display purposes.
Seriously man - the pg_get_def stuff ONLY does the string from the words FOREIGN KEY onwards. The constraint name is done by psql. Pretty printing won't help you.
Chris
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html