|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68193 insert of interval fails
Submitted: 2014-10-09 03:34 UTC Modified: 2021-01-13 18:34 UTC
Avg. Score:3.5 ± 0.5
Reproduced:0 of 0 (0.0%)
From: gorhas at raditex dot nu Assigned: cmb (profile)
Status: Feedback Package: PostgreSQL related
PHP Version: 5.6.1 OS: Ubuntu
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: gorhas at raditex dot nu
New email:
PHP Version: OS:


 [2014-10-09 03:34 UTC] gorhas at raditex dot nu
From manual page:
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.



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-10-17 13:16 UTC]
-Assigned To: +Assigned To: yohgaki
 [2014-10-17 13:17 UTC]
-Package: *General Issues +Package: PostgreSQL related
 [2017-10-24 08:12 UTC]
-Status: Assigned +Status: Open -Assigned To: yohgaki +Assigned To:
 [2021-01-13 18:34 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-01-13 18:34 UTC]
Is this still an issue with any of the actively supported PHP

[1] <>
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jan 23 02:01:25 2021 UTC