Re[2]: bool_plperl transform

From: Ivan Panchenko <wao(at)mail(dot)ru>
To: ilmari(at)ilmari(dot)org
Cc: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re[2]: bool_plperl transform
Date: 2020-03-01 23:30:46
Message-ID: 1583105446.157155716@f330.i.mail.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

 
>Понедельник, 2 марта 2020, 1:09 +03:00 от ilmari(at)ilmari(dot)org:

>Wao < wao(at)mail(dot)ru > writes:

>> +Datum
>> +bool_to_plperl(PG_FUNCTION_ARGS)
>> +{
>> + dTHX;
>> + bool in = PG_GETARG_BOOL(0);
>> + SV *sv = newSVnv(SvNV(in ? &PL_sv_yes : &PL_sv_no));
>> + return PointerGetDatum(sv);
>> +}
>Why is this only copying the floating point part of the built-in
>booleans before returning them? I think this should just return
>&PL_sv_yes or &PL_sv_no directly, like boolean expressions in Perl do,
>and like what happens for NULL (&PL_sv_undef).
Thanks, I will fix this in the next version of the patch.
 
Regards,
Ivan
>
>- ilmari
>--
>"A disappointingly low fraction of the human race is,
> at any given time, on fire." - Stig Sandbeck Mathisen
>

 
 
 
 

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Rémi Lapeyre 2020-03-01 23:45:05 Re: [PATCH v1] Allow COPY "text" to output a header and add header matching mode to COPY FROM
Previous Message Tom Lane 2020-03-01 22:51:26 Re: Remove win32ver.rc from version_stamp.pl