Re: printing oid with %d

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: printing oid with %d
Date: 2020-07-28 07:59:48
Message-ID: 20200728075912.GB28700@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 27, 2020 at 08:55:23PM -0500, Justin Pryzby wrote:
> +JsonEncodeDateTime(char *buf, Datum value, Oid typid)
> ...
> + elog(ERROR, "unknown jsonb value datetime type oid %d", typid);
>
> I think this should be %u.

Good catch. Yep, Oids are unsigned. We don't backpatch such things
usually, do we? Particularly, this one should not be triggerable
normally because no code paths should call JsonEncodeDateTime() with
an unsupported type Oid.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message torikoshia 2020-07-28 08:07:02 Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
Previous Message Alexey Kondratov 2020-07-28 07:54:22 Re: [POC] Fast COPY FROM command for the table with foreign partitions