Re: printing oid with %d - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: printing oid with %d
Date
Msg-id 20200728075912.GB28700@paquier.xyz
Whole thread Raw
In response to printing oid with %d  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: printing oid with %d
List 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

Attachment

pgsql-hackers by date:

Previous
From: Alexey Kondratov
Date:
Subject: Re: [POC] Fast COPY FROM command for the table with foreign partitions
Next
From: torikoshia
Date:
Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?