Re: fix_PGSTAT_NUM_TABENTRIES_macro patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Dilger <markdilger(at)yahoo(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: fix_PGSTAT_NUM_TABENTRIES_macro patch
Date: 2013-12-31 18:25:39
Message-ID: 28374.1388514339@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mark Dilger <markdilger(at)yahoo(dot)com> writes:
> I don't care for the places in the code that say things like

> foo - sizeof(int)

> where "int" refers implicitly to a specific variable or struct field, but
> you have to remember that and change it by hand if you change the
> type of the variable or struct.

> But this sort of code is quite common in postgres, and not
> at all unique to src/include/pgstat.h.

Really? I think we're using offsetof for this type of thing in most
places.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2013-12-31 18:34:01 proposal: persistent plpgsql plugin info - field plugin_info for plpgsql_function structure
Previous Message Mark Dilger 2013-12-31 18:00:26 Re: fix_PGSTAT_NUM_TABENTRIES_macro patch