From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Ildar Musin <i(dot)musin(at)postgrespro(dot)ru>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: IndexTupleDSize macro seems redundant |
Date: | 2017-11-30 21:48:23 |
Message-ID: | CA+TgmoaBZi-oNU4dK-FBDeqRWijxYKc5Lne2hD7+bn+sXKuT3g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Nov 21, 2017 at 9:26 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> +1. I was also once confused with these macros. I think this is a
> good cleanup. On a quick look, I don't see any problem with your
> changes.
One difference between those two macros is that IndexTupleSize
forcibly casts the argument to IndexTuple, which means that you don't
get any type-checking when you use that one. I suggest that in
addition to removing IndexTupleDSize as proposed, we also remove that
cast. It seems that the only place which relies on that cast
currently is btree_xlog_split.
Therefore I propose the attached patch instead.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment | Content-Type | Size |
---|---|---|
remove-indextupledsize-v2.patch | application/octet-stream | 6.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2017-11-30 21:50:37 | Re: IndexTupleDSize macro seems redundant |
Previous Message | Thomas Munro | 2017-11-30 21:41:39 | Re: [HACKERS] <> join selectivity estimate question |