Re: Proposal to use JSON for Postgres Parser format - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Proposal to use JSON for Postgres Parser format
Date
Msg-id 20221027233856.dy7orre6mrxlgpuc@awork3.anarazel.de
Whole thread Raw
In response to Re: Proposal to use JSON for Postgres Parser format  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Proposal to use JSON for Postgres Parser format  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Hi,

On 2022-09-19 22:29:15 -0400, Tom Lane wrote:
> There are certainly reasons to think about changing the node tree
> storage format; but if we change it, I'd like to see it go to something
> more compact not more verbose.

Very much seconded - the various pg_node_trees are a quite significant
fraction of the overall size of an empty database. And they're not
particularly useful for a human either.

IIRC it's not just catalog storage that's affected, but iirc also relevant for
parallel query.

My pet peeve is the way datums are output as individual bytes printed as
integers each. For narrow fixed-width datums including a lot of 0's for bytes
that aren't even used in the datum.


> Maybe a compromise could be found whereby we provide a conversion function
> that converts whatever the catalog storage format is to some JSON
> equivalent.  That would address the needs of external code that doesn't want
> to write a custom parser, while not tying us directly to JSON.

+1

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: Support logical replication of DDLs
Next
From: Tom Lane
Date:
Subject: Re: Requiring 32 bit atomics