The existing sentence is pretty mangled English, though.
Agreed.
When the database-username field is a regular expression, it is not possible to use \1 within it to refer to a capture from the system-username field.
Thoughts?
Its good as far a narrow fix goes.
But how about the attached? More invasive but covers the salient points better, IMO, and less repetitive than having the two fields have their own basically copy-pasted paragraphs.
I didn't add an example but felt the point "be referenced a single time within" to be needed since, usefulness not withstanding, writing \1\1 for database-username works but only the first instance of \1 is replaced.
Also, should we attempt to align this documentation and pg_ident.conf.sample as pertains to pg-username vs. database-username?