Re: [HACKERS] WIP patch for Oid formatting in printf/elog strings

2014-12-18 Thread Alvaro Herrera
Mark Dilger wrote: > I've been going through a copy of the code and replacing int32 and uint32 > with the appropriate type such as Oid, TransactionId, and such, and have > created my own typedef for TypeModType, in order to help chase through > the code and figure out what functions handle what ki

Re: [HACKERS] WIP patch for Oid formatting in printf/elog strings

2014-12-11 Thread Bruce Momjian
On Thu, Dec 11, 2014 at 01:25:00PM -0800, Mark Dilger wrote: > > > On Thu, Dec 11, 2014 at 12:12 PM, Tom Lane wrote: > > Mark Dilger writes: > > The attached patch changes the type of chunk_seq to int32, > > rather than changing the %d formatting.  The other changes > > are the

Re: [HACKERS] WIP patch for Oid formatting in printf/elog strings

2014-12-11 Thread Mark Dilger
I spoke too soon. Actually, the Oid definition is in src/include/postgres_ext.h, which I'm sure you all know. But I'm changing other typedefs too, not just for Oid. I've been going through a copy of the code and replacing int32 and uint32 with the appropriate type such as Oid, TransactionId, and

Re: [HACKERS] WIP patch for Oid formatting in printf/elog strings

2014-12-11 Thread Mark Dilger
On Thu, Dec 11, 2014 at 12:12 PM, Tom Lane wrote: > Mark Dilger writes: > > The attached patch changes the type of chunk_seq to int32, > > rather than changing the %d formatting. The other changes > > are the same as in the previous patch. > > BTW, how are you finding these? If it's some autom

Re: [HACKERS] WIP patch for Oid formatting in printf/elog strings

2014-12-11 Thread Alvaro Herrera
Tom Lane wrote: > Mark Dilger writes: > > The attached patch changes the type of chunk_seq to int32, > > rather than changing the %d formatting. The other changes > > are the same as in the previous patch. > > BTW, how are you finding these? If it's some automated tool, what? > (If you're findi

Re: [HACKERS] WIP patch for Oid formatting in printf/elog strings

2014-12-11 Thread Tom Lane
Mark Dilger writes: > The attached patch changes the type of chunk_seq to int32, > rather than changing the %d formatting. The other changes > are the same as in the previous patch. BTW, how are you finding these? If it's some automated tool, what? (If you're finding them by hand, I'm in awe of

Re: [HACKERS] WIP patch for Oid formatting in printf/elog strings

2014-12-11 Thread Mark Dilger
Thank you Alvaro, The attached patch changes the type of chunk_seq to int32, rather than changing the %d formatting. The other changes are the same as in the previous patch. Mark Dilger On Thu, Dec 11, 2014 at 9:39 AM, Alvaro Herrera wrote: > Mark Dilger wrote: > > I found a few places in t

Re: [HACKERS] WIP patch for Oid formatting in printf/elog strings

2014-12-11 Thread Alvaro Herrera
Mark Dilger wrote: > I found a few places in the code where a variable of > type Oid is printed using "%d" rather than "%u" and > changed them in the attached patch. > > In src/backend/replication/logical/reorderbuffer.c, > circa line 2494, chunk_seq is of type Oid, but > ent->last_chunk_seq is of