Bug #71998 [Opn]: Function pg_insert does not insert when column type = inet

From: Date: Sat, 09 Apr 2016 15:43:12 +0000
Subject: Bug #71998 [Opn]: Function pg_insert does not insert when column type = inet
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200458@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71998&edit=1 ID: 71998 User updated by: jaroslav_cerny at centrum dot cz Reported by: jaroslav_cerny at centrum dot cz Summary: Function pg_insert does not insert when column type = inet Status: Open Type: Bug Package: PostgreSQL related Operating System: Windows PHP Version: 7.0.5 Block user comment: N Private report: N New Comment: PostgreSQL 9.5.2, 64bit Previous Comments: ------------------------------------------------------------------------ [2016-04-09 15:40:38] jaroslav_cerny at centrum dot cz 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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=71998&edit=1

« previous php.bugs (#200458) next »