|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-04-10 20:23 UTC] helly@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 05:00:01 2025 UTC |
Description: ------------ pg_query_params seems to be converting boolean "false" parameters to an empty string before sending the query to Postgres, resulting in the following error: ERROR: invalid input syntax for type boolean: "" Reproduce code: --------------- Create a table: CREATE TABLE test (id serial8, flag boolean); Execute this php script: <?php $conn = pg_connect('host=localhost dbname=test user=user password=pass'); pg_query_params($conn, 'INSERT INTO test (flag) VALUES ($1)', array(false)); ?> Expected result: ---------------- A new row should be inserted with the correct boolean field value. Actual result: -------------- ERROR: invalid input syntax for type boolean: ""