Re: Is float8 a reference type?

From: Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Is float8 a reference type?
Date: 2017-09-23 03:10:31
Message-ID: CA+renyX1RdfYGGJB1unMLaMfbYCLzRBCuTrq=-HZ=_SyfMnGPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Sep 22, 2017 at 8:05 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
> yes, it is 8 bytes on 64-bit.

Thanks!

> I don't think so it is good idea to write 64bit only extensions.

I agree, but how about this?:

if (FLOAT8PASSBYVAL) {
datums = (Datum *)floats;
} else {
datums = palloc0(arrlen * sizeof(Datum));
for (i = 0; i < arrlen; i++) {
datums[i] = Float8GetDatum(floats[i]);
}
}

Thanks,
Paul

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2017-09-23 03:28:11 Re: Is float8 a reference type?
Previous Message Paul A Jungwirth 2017-09-23 03:05:11 Re: Is float8 a reference type?