Re: Proposal: new file format for hba/ident/hosts configuration? - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Proposal: new file format for hba/ident/hosts configuration?
Date
Msg-id CAD5tBcLFQvaV7+-onng6DUAJFZY9KFvP4w3XOxQp6X0_AHi+YQ@mail.gmail.com
Whole thread
In response to Re: Proposal: new file format for hba/ident/hosts configuration?  (Zsolt Parragi <zsolt.parragi@percona.com>)
Responses Re: Proposal: new file format for hba/ident/hosts configuration?
Re: Proposal: new file format for hba/ident/hosts configuration?
List pgsql-hackers


On Wed, Jul 8, 2026 at 11:33 AM Zsolt Parragi <zsolt.parragi@percona.com> wrote:
On Tue, Jul 7, 2026 at 6:17 PM Tristan Partin <tristan@partin.io> wrote:
> I think the best option other than TOML is JSON5.

I agree, my first prototype before TOML was JSON5.

On Tue, Jul 7, 2026 at 10:21 PM Andrew Dunstan <andrew@dunslane.net> wrote:
> Having implemented two (!) JSON parsers for PostgreSQL, as well as recently a json schema validator extension [1], I have some skin in this game.
> I am really not a fan of implementing more and more little languages inside Postgres. Doing so will incur a non-zero maintenance burden.

Mainly for this reason, because if we add JSON5 support to the parser
that's already in postgres, we don't have to worry about adding
another library.

I focused on TOML in my email because I think that's still a better
configuration format than JSON5. However, we could use JSON or another
format, as long as it's a well-defined, common format, it will be a
big improvement.



Just for kicks I asked my new best friend (<weg>) to allow for json5 on the RD parser. The actual parser changes are minimal.  Most of the changes are in the lexer. I didn't implement it for the incremental parser, and I skipped the new numeric formats.

cheers

andrew
Attachment

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Add a hook for handling logical decoding messages on subscribers.
Next
From: Xuneng Zhou
Date:
Subject: Re: Implement waiting for wal lsn replay: reloaded