Re: [GENERAL] Is float8 a reference type? - Mailing list pgsql-general

From Paul A Jungwirth
Subject Re: [GENERAL] Is float8 a reference type?
Date
Msg-id CA+renyX1RdfYGGJB1unMLaMfbYCLzRBCuTrq=-HZ=_SyfMnGPg@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] Is float8 a reference type?  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: [GENERAL] Is float8 a reference type?
Re: [GENERAL] Is float8 a reference type?
List pgsql-general
On Fri, Sep 22, 2017 at 8:05 PM, Pavel Stehule <pavel.stehule@gmail.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


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Paul A Jungwirth
Date:
Subject: Re: [GENERAL] Is float8 a reference type?
Next
From: Pavel Stehule
Date:
Subject: Re: [GENERAL] Is float8 a reference type?