Re: pgsql: Add more SQL/JSON constructor functions - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: pgsql: Add more SQL/JSON constructor functions
Date
Msg-id 202405271326.5a5rprki64aw@alvherre.pgsql
Whole thread Raw
Responses Re: pgsql: Add more SQL/JSON constructor functions
Re: pgsql: Add more SQL/JSON constructor functions
List pgsql-hackers
On 2024-May-27, Alvaro Herrera wrote:

> > JSON_SERIALIZE()

I just noticed this behavior, which looks like a bug to me:

select json_serialize('{"a":1, "a":2}' returning varchar(5));
 json_serialize 
────────────────
 {"a":

I think this function should throw an error if the destination type
doesn't have room for the output json.  Otherwise, what good is the
serialization function?

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Fix calloc check if oom (PQcancelCreate)
Next
From: Ranier Vilela
Date:
Subject: Re: Fix calloc check if oom (PQcancelCreate)