On Sun, Jul 13, 2025 at 11:30 AM Tom Lane <t...@sss.pgh.pa.us> wrote:
> I figured out how to make the 003_peer.pl tests for \1 less > hacky, and pushed that. Here's a proposed patch for the > documentation side of things, including your suggestion to > make pg_ident.conf.sample match up better. > > Thanks. My goal of trying to be a bit more precise regarding the \1 reference is probably counter-productive. The existing wording makes me ask "why" to which the answer is "because if database-username is a regexp a reference to \1 resolves to any capturing groups it defines; and if there are none the regexp will be malformed and break when you attempt to reload pg_hba.conf". But that is a lot of words for something that is unlikely to be encountered in practice and does distract the reader from the main point. (Likewise, the system-username regexp can contain more than one capture - which are only available later in the system-username regexp - though again it seems unlikely anyone is going to use that feature in this context.) I'm good with this. Thanks! David J.