|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-04-09 15:43 UTC] jaroslav_cerny at centrum dot cz
[2016-04-10 16:50 UTC] ab@php.net
[2016-04-10 16:50 UTC] ab@php.net
-Status: Open
+Status: Closed
[2016-07-20 11:32 UTC] davey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 04:00:01 2025 UTC |
Description: ------------ Hello, pg_insert fails when PostgreSQL column type is inet. Standard pg_query runs without issue. Test script: --------------- PostgreSQL: CREATE TABLE tmp_statistics ( id integer NOT NULL, remote_addr inet ); PHP: $data = Array("id" => 1, "remote_addr" => '127.0.0.1'); $dbconn = getDB(); // open connection $res = pg_insert($dbconn, 'tmp_statistics', $data); echo pg_last_error($dbconn); // Notice: pg_insert(): Expects NULL or string for 'inet' (remote_addr) in ... pg_query($dbconn, "insert into tmp_statistics (id, remote_addr) values (2, '127.0.0.1')"); // OK, record inserted Expected result: ---------------- Two inserted records Actual result: -------------- Only second record is inserted