Bug #68193 [Fbk->NoF]: insert of interval fails

From: Date: Sun, 24 Jan 2021 04:22:08 +0000
Subject: Bug #68193 [Fbk->NoF]: insert of interval fails
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231730@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68193&edit=1 ID: 68193 Updated by: php-bugs@lists.php.net Reported by: gorhas at raditex dot nu Summary: insert of interval fails -Status: Feedback +Status: No Feedback Type: Bug Package: PostgreSQL related Operating System: Ubuntu PHP Version: 5.6.1 Assigned To: cmb Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. Previous Comments: ------------------------------------------------------------------------ [2021-01-13 18:34:05] cmb@php.net Is this still an issue with any of the actively supported PHP versions[1]? [1] <https://www.php.net/supported-versions.php> ------------------------------------------------------------------------ [2014-10-09 03:34:11] gorhas at raditex dot nu Description: ------------ --- From manual page: http://www.php.net/function.pg-insert --- If a field is an interval: time_pause | interval | default '00:00:00'::interval and we try to insert with pg_insert("..." => "...", "time_pause" => "00:30:00" ..); We get: .PHP Notice: pg_insert(): '00:00:00' does not match with '^(@?[ \t]+)?((([-+]?[ \t]+)?[0-9]+(\.[0-9]*)?[ \t]*(millenniums|millennia|millennium|mil|mils|centuries|century|cent|c|decades|decade|dec|decs|years|year|y|months|month|mon|weeks|week|w|days|day|d|hours|hour|hr|hrs|h|minutes|minute|mins|min|m|seconds|second|secs|sec|s))+|((([-+]?[ \t]+)?[0-9]+(\.[0-9]*)?[ \t]*(millenniums|millennia|millennium|mil|mils|centuries|century|cent|c|decades|decade|dec|decs|years|year|y|months|month|mon|weeks|week|w|days|day|d))+([-+]?[ \t]+([0-9]+[ \t]+)+(([0-9]{1,2}:){0,2}[0-9]{0,2}))?))([ \t]+ago)?$' in /home/gorhas/hg-rbis/rbis-repository/bin/rbis-library-migrate.php on line 111 PHP Notice: pg_insert(): Expects NULL or string for PostgreSQL interval field (time_pause) in /home/gorhas/hg-rbis/rbis-repository/bin/rbis-library-migrate.php on line 111 if we use other format: eg 00H30M00S this is ok. So this is a workaround. An ordinary $query = "insert into timelog.workpoint (time_pause) values ( '00:30:00' )"; pg_query($dbcon, $query); is ok. /gh ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68193&edit=1

« previous php.bugs (#231730) next »