Subject: | boolean[ ] handling |
Date: | Mon, 02 Mar 2009 13:38:59 +0000 |
To: | bug-DBD-Pg [...] rt.cpan.org |
From: | Armando Santos <ajs [...] binarios.com> |
Referencing DBD-Pg-2.11.8:
Array stringification for boolean[ ] works ok, but destringification
fails, returning a reference to a array of strings.
As I needed this working, I changed the following:
File types.c, line 23:
from
{PG_BOOLARRAY ,"_bool" ,1,',',"array_out"
,quote_string,dequote_string,{0},0},
to
{PG_BOOLARRAY ,"_bool" ,1,',',"array_out"
,quote_string,dequote_string,{0},3},
File dbdimp.c, inserted at line 2580:
else if (3 == coltype->svtype)
av_push(currentav,
newSViv(*string=='t'?1:0));
Notes:
It seems to be working now, but it's not probably a proper patch. The
change to file types.c should be done from the included Perl script, but
I couldn't make it work on the Postgresql v8.3.5 that I'm using, and
being unfamiliar with the implications of the conversion, I didn't dare
correct the script.
Greetings
Armando Santos