| From: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> |
|---|---|
| To: | Li Japin <japinli(at)hotmail(dot)com>, ashutosh(dot)bapat(at)enterprisedb(dot)com |
| Cc: | Alexey Kondratov <a(dot)kondratov(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Craig Ringer <craig(dot)ringer(at)enterprisedb(dot)com> |
| Subject: | Re: Printing LSN made easy |
| Date: | 2020-11-30 13:06:42 |
| Message-ID: | CAExHW5v+W26wsKWKbadD2na9wxz77E1K+Md1hHxeBR8vVyiHeQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Nov 27, 2020 at 9:51 PM Li Japin <japinli(at)hotmail(dot)com> wrote:
>
> Hi,
>
> Here, we cannot use sizeof(but) to get the buf size, because it is a pointer, so it always
> 8 bytes on 64-bit or 4 bytes on 32-bit machine.
For an array, the sizeof() returns the size of memory consumed by the
array. See section "Application to arrays" at
https://en.wikipedia.org/wiki/Sizeof.
--
Best Wishes,
Ashutosh Bapat
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alexander Korotkov | 2020-11-30 13:12:29 | Re: [HACKERS] [PATCH] Generic type subscripting |
| Previous Message | Daniel Gustafsson | 2020-11-30 13:05:21 | Re: OpenSSL 3.0.0 compatibility |