Re: WIP patch for Oid formatting in printf/elog strings
От | Mark Dilger |
---|---|
Тема | Re: WIP patch for Oid formatting in printf/elog strings |
Дата | |
Msg-id | CAE-h2Topay9sbTt86OrEzmkApoTbuaSwsCO_9e7FW_6tEFRU2g@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: WIP patch for Oid formatting in printf/elog strings (Mark Dilger <hornschnorter@gmail.com>) |
Ответы |
Re: WIP patch for Oid formatting in printf/elog strings
|
Список | pgsql-hackers |
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.which I'm sure you all know. But I'm changing other typedefs too, not
the code and figure out what functions handle what kind of data. By
defining TypeModType to int64, for example, I get lots of compiler errors
lets me know that the callers of that function think of it as a typemod argument,
even if it does not have any clear documentation to that effect.
"the value " TYPEMODTYPE_FORMAT " is out of bounds", but the clarity
I get from it helps enough that it is useful to me.
once before, and it worked and passed all the regression tests and such,
but I did it by replacing lots of instances of int32 with instances of int64,
so it didn't help clarify the meaning of anything. This time, I'm hoping that
I can keep in sync with all the commits so that I can build a 32-bit or a
On Thu, Dec 11, 2014 at 1:25 PM, Mark Dilger <hornschnorter@gmail.com> wrote:
On Thu, Dec 11, 2014 at 12:12 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:Mark Dilger <hornschnorter@gmail.com> 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 your scan rate.)
regards, tom laneI've been advised to hoodwink you and say that I have found them all
by hand. Actually, I am changing the typedef in src/include/c.h and then
recompiling, and watching for compiler warnings telling me that I ampassing a uint64 to a %d. Of course, I get lots of warnings aboutpassing a uint64 to a %u, but I can filter through those easily enough.Also, the macros in outfuncs.c tend to complain in a similar way, and
I can check that output, too.mark
В списке pgsql-hackers по дате отправления: