Re: plan time of MASSIVE partitioning ... - Mailing list pgsql-hackers

From Tom Lane
Subject Re: plan time of MASSIVE partitioning ...
Date
Msg-id 4593.1283961828@sss.pgh.pa.us
Whole thread Raw
In response to Re: plan time of MASSIVE partitioning ...  (Stephen Frost <sfrost@snowman.net>)
List 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


pgsql-hackers by date:

Previous
From: Boszormenyi Zoltan
Date:
Subject: Re: plan time of MASSIVE partitioning ...
Next
From: Alvaro Herrera
Date:
Subject: Re: "serializable" in comments and names