From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, Noah Misch <noah(at)leadboat(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: dsm use of uint64 |
Date: | 2013-11-04 16:23:11 |
Message-ID: | CA+TgmoZnpYZiWkg7NrY0kPquDVbVFTP+DGGLme+Xn=9Sj0s8DA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Nov 4, 2013 at 10:55 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
>> Ah. This is because I didn't change the format code used to print the
>> arguments; it's still using UINT64_FORMAT, but the argument is now a
>> Size. What's the right way to print out a Size, anyway?
>
> There isn't a nice one currently. glibc/gcc have %z that automatically
> has the right width, but that's not supported by windows. I've been
> wondering if we shouldn't add support for that just like we have added
> support for %m.
>
>> Should I
>> just try %lu? It seems that sysv_shmem.c uses %lu, but also casts the
>> value to (unsigned long); I could follow that precedent here, if
>> there's no consistency to what format is needed to print a size_t.
>
> Yes, you need a cast like that.
Whee, portability is fun. OK, I changed it to work that way.
Hopefully that'll do the trick.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Claudio Freire | 2013-11-04 16:24:14 | Re: Fast insertion indexes: why no developments |
Previous Message | Robert Haas | 2013-11-04 16:09:35 | Re: Fast insertion indexes: why no developments |