Re: OID unsigned long long
От | David Ford |
---|---|
Тема | Re: OID unsigned long long |
Дата | |
Msg-id | 3B7B3137.3070100@erisksecurity.com обсуждение исходный текст |
Ответ на | OID unsigned long long (mlw <markw@mohawksoft.com>) |
Список | pgsql-hackers |
Tom Lane wrote: >[...] > >BTW, I think #ifdef would be a totally unworkable way to attack the >format-string problem. The code clutter of #ifdef'ing everyplace that >presently uses %u would be a nightmare; the impact on >internationalization files would be worse. And don't forget that %llu >would be the right thing on only some machines; others like %qu, and >DEC Alphas think %lu is just fine. The only workable answer I can see >is for the individual messages to use some special code, maybe "%O" for >Oid. The problem is then (a) translating this to the right >platform-dependent thing, and (b) persuading gcc to somehow type-check >the elog calls anyway. > You can ask gcc to typecheck format strings for printf type functions with something like the following: extern int my_printf (void *my_object, const char *my_format, ...) __attribute__ ((format (printf, 2, 3))); Ref: http://www.delorie.com/gnu/docs/gcc/gcc_77.html David
В списке pgsql-hackers по дате отправления: