From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Add %z support to elog/ereport? |
Date: | 2014-01-23 17:54:22 |
Message-ID: | 17059.1390499662@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> snprintf(buf64, 100, UINT64_FORMAT, ~(size_t)0);
Actually, that coding isn't gonna work at all on platforms where size_t
isn't the same size as uint64. We could make it work by explicitly
casting the argument to whatever type we've decided to use as uint64
... but unless we want to include c.h here, that would require a lot of
extra cruft, and I'm really not sure it's gaining anything anyway.
I'm inclined to just print (size_t)0xFFFFFFFF and see if it produces
the expected result.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2014-01-23 17:58:32 | Re: Add %z support to elog/ereport? |
Previous Message | Alvaro Herrera | 2014-01-23 17:48:29 | Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist |