From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | pgsql-committers(at)postgresql(dot)org |
Subject: | Re: pgsql: Remove hard coded formats for INT64 and use configured settings |
Date: | 2011-04-27 15:15:34 |
Message-ID: | 16133.1303917334@sss.pgh.pa.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Remove hard coded formats for INT64 and use configured settings instead.
I don't find this patch to be a good idea. The code was unconditionally
correct before, and now it isn't:
- sprintf(mallocedval + strlen(mallocedval), "%lld,", ((long long int *) var->value)[element]);
+ sprintf(mallocedval + strlen(mallocedval), INT64_FORMAT ",", ((long long int *) var->value)[element]);
"long long int" will match "%lld" by definition. It matches
INT64_FORMAT only if "long long int" is 64 bits. What's more,
this change will probably result in adding not subtracting warnings
on platforms where configure selects "%ld" for INT64_FORMAT.
Please revert.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2011-04-27 15:29:32 | pgsql: Revert "Remove hard coded formats for INT64 and use configured s |
Previous Message | Andrew Dunstan | 2011-04-27 15:09:13 | pgsql: Remove hard coded formats for INT64 and use configured settings |