| From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
|---|---|
| To: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
| Cc: | Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, Tristan Partin <tristan(at)partin(dot)io>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Proposal: new file format for hba/ident/hosts configuration? |
| Date: | 2026-07-09 12:16:22 |
| Message-ID: | CAD5tBcLFQvaV7+-onng6DUAJFZY9KFvP4w3XOxQp6X0_AHi+YQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Jul 8, 2026 at 11:33 AM Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
wrote:
> On Tue, Jul 7, 2026 at 6:17 PM Tristan Partin <tristan(at)partin(dot)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(at)dunslane(dot)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 | Content-Type | Size |
|---|---|---|
| 0001-Support-JSON5-syntax-in-the-recursive-descent-JSON-p.patch | text/x-patch | 31.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Xuneng Zhou | 2026-07-09 12:24:57 | Re: Implement waiting for wal lsn replay: reloaded |
| Previous Message | Fujii Masao | 2026-07-09 12:14:46 | Re: Add a hook for handling logical decoding messages on subscribers. |