-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

"H.Merijn Brand" wrote:
> When I use bind_param on a char (4) field in DBD::Pg, 
> it only loads the first character:

Finally got some spare cycles to dig into this. It was indeed a bug 
in DBD::Pg. I just pushed the change at:

80cf6d864f908c4e99ecf3ef1e8a687dec89059

Thank you for finding this and creating a good test case. What happened is 
that the type mapping file, types.c was mapping a SQL_CHAR back to an 
internal Postgres type of 'char', when it should have gone back to 'bpchar'. 
Both map back to SQL_CHAR, but the script was not checking the "this one is 
canonical" flag when creating the reverse mapping, and thus the 
SQL_CHAR -> bpchar mapping was getting clobbered by the SQL_CHAR -> char 
mapping. All seems to work as expected now, and there is a new test in 
t/04-misc.t as well.

- -- 
Greg Sabino Mullane g...@turnstep.com
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 201309010026
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAlIiwgEACgkQvJuQZxSWSsi6sACfWtpD+NasvRmKhX37HrZYWI/W
zVUAoMsd9POaTXCzmxuNDugt3TyaDk37
=UJoW
-----END PGP SIGNATURE-----


Reply via email to