| From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
|---|---|
| To: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: dubious warning: FORMAT JSON has no effect for json and jsonb types |
| Date: | 2023-08-16 14:59:03 |
| Message-ID: | CAHyXU0z64KYkB+E2fJmwJ6MkZdqGyByo3KpdWrKBHeeLhs-h8A@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Aug 16, 2023 at 8:55 AM Peter Eisentraut <peter(at)eisentraut(dot)org>
wrote:
> This warning comes from parse_expr.c transformJsonValueExpr() and is
> triggered for example by the following test case:
>
> SELECT JSON_OBJECT('foo': NULL::json FORMAT JSON);
> WARNING: FORMAT JSON has no effect for json and jsonb types
>
> But I don't see anything in the SQL standard that would require this
> warning. It seems pretty clear that FORMAT JSON in this case is
> implicit and otherwise without effect.
>
> Also, we don't have that warning in the output case (RETURNING json
> FORMAT JSON).
>
> Anyone remember why this is here? Should we remove it?
+1 for removing, on the basis that it is not suprising, and would pollute
logs for most configurations.
merlin
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nathan Bossart | 2023-08-16 15:17:05 | Re: should frontend tools use syncfs() ? |
| Previous Message | Tomas Vondra | 2023-08-16 14:26:46 | Re: logical decoding and replication of sequences, take 2 |