Bug #68193 [NEW]: insert of interval fails

From: Date: Thu, 09 Oct 2014 03:34:12 +0000
Subject: Bug #68193 [NEW]: insert of interval fails
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187969@lists.php.net to get a copy of this message
From: gorhas at raditex dot nu Operating system: Ubuntu PHP version: 5.6.1 Package: *General Issues Bug Type: Bug Bug description:insert of interval fails 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 bug report at https://bugs.php.net/bug.php?id=68193&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68193&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68193&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68193&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=68193&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=68193&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=68193&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=68193&r=needscript Try newer version: https://bugs.php.net/fix.php?id=68193&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=68193&r=support Expected behavior: https://bugs.php.net/fix.php?id=68193&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=68193&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=68193&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=68193&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68193&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=68193&r=dst IIS Stability: https://bugs.php.net/fix.php?id=68193&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=68193&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=68193&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=68193&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=68193&r=mysqlcfg

« previous php.bugs (#187969) next »