Re: pgsql: Only allow returning string types or bytea from json_serialize - Mailing list pgsql-committers

From Kyotaro Horiguchi
Subject Re: pgsql: Only allow returning string types or bytea from json_serialize
Date
Msg-id 20220708.154135.2123613118233840495.horikyota.ntt@gmail.com
Whole thread Raw
In response to pgsql: Only allow returning string types or bytea from json_serialize  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: pgsql: Only allow returning string types or bytea from json_serialize
List pgsql-committers
At Thu, 07 Jul 2022 21:46:12 +0000, Andrew Dunstan <andrew@dunslane.net> wrote in 
> Only allow returning string types or bytea from json_serialize

I noticed that this introcues the following error message.

+  errmsg("cannot use RETURNING type %s in JSON_SERIALIZE"
+                                format_type_be(returning->typid)),

However, the same file has the following error message.

>             errmsg("cannot use RETURNING type %s in %s",
>                    format_type_be(returning->typid), fname),

So, couldn't we share the format string to reduce translatable
messages?

And, the other messages are

cannot use RETURNING type %s in JSON_SCALAR(), and
cannot use RETURNING type %s in JSON()

So, I think this should not be

cannot use RETURNING type %s in JSON_SERIALIZE

, but should be

cannot use RETURNING type %s in JSON_SERIALIZE()

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment

pgsql-committers by date:

Previous
From: Thomas Munro
Date:
Subject: pgsql: Remove HP/Intel Itanium support.
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Reformat some more node comments