| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | fairyfar(at)msn(dot)com |
| Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BUG #19429: An issue regarding the processing of Oid as an int type in ecpg |
| Date: | 2026-03-15 23:00:28 |
| Message-ID: | 2247548.1773615628@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> Part of the code caches and calculates the Oid as an int type in ecpg.
> We know that Oid is unsigned int. When the Oid value is greater than or
> equal to 2^31, it exceeds the value range of the int type. There are
> potential problems in processing Oid with the int type. For example, when
> formatting Oid with "%d", negative values may occur.
> Through analysis and testing, it is found that the ecpg part of the code has
> not caused any problems so far, but it is running in an obscure way.
Yeah, it does work as-is, but it's relying on undocumented details
about what the server will do with something like "oid=-1".
I reviewed your patch and pushed it. For future reference, it's not
great to send patches via our bug report form; whitespace gets mangled
and it's quite painful to reconstruct. Better to just send email to
pgsql-hackers with the patch in an attachment.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Felix Hamme | 2026-03-16 13:56:03 | Re: BUG #19432: recovery fails at invalid checkpoint record |
| Previous Message | Tom Lane | 2026-03-15 21:27:20 | Re: BUG #19433: json_object_agg_unique Crashes When Used as Window Function |