Re: Proposal: allow non-masked IPs inside of pg_hba.conf

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: allow non-masked IPs inside of pg_hba.conf
Date: 2025-02-11 20:30:12
Message-ID: 3211610.1739305812@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Sabino Mullane <htamfids(at)gmail(dot)com> writes:
> Currently, all IP addresses in the address field of records in the
> pg_hba.conf file require a CIDR mask.
> ...
> I'd like to relax that requirement, such that a lack of an explicit mask
> defaults to a /32 mask, allowing that first example to work as most people
> would expect.

This too would work better if hba.c were sharing cidr_in's logic:

regression=# select '1.2.3.4'::cidr;
cidr
------------
1.2.3.4/32
(1 row)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-02-11 20:46:43 Re: explain analyze rows=%.0f
Previous Message Euler Taveira 2025-02-11 20:25:13 Re: Separate GUC for replication origins