From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: andrew@dunslane.net
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Only allow returning string types or bytea from json_serialize
Date: Fri, 08 Jul 2022 15:41:35 +0900 (JST)
Message-ID: <20220708.154135.2123613118233840495.horikyota.ntt@gmail.com> (raw)
In-Reply-To: <E1o9ZK7-001hML-4h@gemulon.postgresql.org>
References: <E1o9ZK7-001hML-4h@gemulon.postgresql.org>
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
Attachments:
0001-Fix-an-error-message.patch (text/x-patch, 0B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: horikyota.ntt@gmail.com, andrew@dunslane.net
Subject: Re: pgsql: Only allow returning string types or bytea from json_serialize
In-Reply-To: <20220708.154135.2123613118233840495.horikyota.ntt@gmail.com>
References: <E1o9ZK7-001hML-4h@gemulon.postgresql.org> <20220708.154135.2123613118233840495.horikyota.ntt@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox