Re: plan time of MASSIVE partitioning ...
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephen Frost <sfrost@snowman.net>
Cc: Robert Haas <robertmhaas@gmail.com>, Hans-Jürgen Schönig <postgres@cybertec.at>, Boszormenyi Zoltan <zb@cybertec.at>, pgsql-hackers Hackers <pgsql-hackers@postgresql.org>
Date: 2010-09-08T16:03:48Z
Lists: pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes: > Indeed, but code like this makes me wonder if this is really working the > way it's supposed to: > + val1 = (long)pk_left->pk_eclass; > + val2 = (long)pk_right->pk_eclass; Ugh. Casting a pointer to long? We do have portable ways to do what this is trying to do, but that is not one. (For example, this is guaranteed to misbehave on 64-bit Windows.) Offhand I think PointerGetDatum might be the best way. regards, tom lane