Re: psql JSON output format - Mailing list pgsql-hackers

From Laurenz Albe
Subject Re: psql JSON output format
Date
Msg-id 97a2c51cb4b7b5ee6729a436f940444c0f563b7c.camel@cybertec.at
Whole thread Raw
In response to Re: psql JSON output format  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: psql JSON output format
List pgsql-hackers
On Tue, 2024-01-23 at 08:01 -0700, David G. Johnston wrote:
> I do think that the output should include a metadata section that lists all of
> the actual columns in the result, the column position, and since we have the
> info available, the data type name and possibly OID.  Then any column name
> present in the metadata but that isn't a key name for a given object is known
> to have an SQL NULL as the value of that column in that row.

Sounds attractive, but I'm a bit worried that that additional information
might make life harder for some consumers.

My crystal ball is as cloudy as anybody's when it comes to guessing the
most likely use cases for the feature, but I'd rather keep it simple and add
features like that later, if there is a demand.

If you import the data into an existing structure, you don't need the metadata.

Yours,
Laurenz Albe



pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: psql JSON output format
Next
From: Christoph Berg
Date:
Subject: Re: psql JSON output format