On 20/09/12 12:02 PM, Alec Smecher wrote:
It looks to me like a textbook use case of pg_query_params will
currently fail depending on what locale is being used. What Claude at
<https://bugs.php.net/bug.php?id=46408#1334753071> and Lars here are
trying to do is make it a general fix, which is good -- but the
problem is best exemplified IMO by the above snippet. The work-around
suggested by j...@php.net
(https://bugs.php.net/bug.php?id=46408#1227272959) illustrates further:
$oldLocale = setlocale(LC_NUMERIC, 'C');
pg_query_params($conn, 'INSERT INTO myTable (myColumn) values ($1)',
array(3.5));
setlocale(LC_NUMERIC, $oldLocale);
That's an example of a work-around for a broken API in my opinion.
Ping. Any feedback on this?
Thanks,
Alec
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php