Last modified: 2012-08-04 20:49:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 13026 - Wrong timestamp format in Postgres
Wrong timestamp format in Postgres
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
Blocks: postgres
  Show dependency treegraph
Reported: 2008-02-15 15:49 UTC by Daniel Wilches
Modified: 2012-08-04 20:49 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Daniel Wilches 2008-02-15 15:49:19 UTC
Hi. An error happened in my wiki while trying to see the "diff" between an article's revisions. I'm using PostgreSQL. The error is related to an invalid timestamp format in the selection.

Here is the complete error message:

A database error has occurred Query: SELECT * FROM recentchanges WHERE rc_timestamp = '20080215154313' AND rc_this_oldid = '556' AND rc_last_oldid = '416' AND rc_patrolled = '0' Function: DifferenceEngine::showDiffPage Error: 1 ERROR: invalid input syntax for type timestamp with time zone: "20080215154313"


#0 D:\Apache Software Foundation\Apache2.2\htdocs\wiki\includes\Database.php(779): DatabasePostgres->reportQueryError('ERROR: invalid...', 1, 'SELECT * FROM...', 'DifferenceEngin...', false)
#1 D:\Apache Software Foundation\Apache2.2\htdocs\wiki\includes\Database.php(1224): Database->query('SELECT * FROM...', 'DifferenceEngin...')
#2 D:\Apache Software Foundation\Apache2.2\htdocs\wiki\includes\RecentChange.php(100): Database->select('recentchanges', '*', Array, 'DifferenceEngin...')
#3 D:\Apache Software Foundation\Apache2.2\htdocs\wiki\includes\DifferenceEngine.php(177): RecentChange::newFromConds(Array, 'DifferenceEngin...')
#4 D:\Apache Software Foundation\Apache2.2\htdocs\wiki\includes\Article.php(674): DifferenceEngine->showDiffPage(false)
#5 D:\Apache Software Foundation\Apache2.2\htdocs\wiki\includes\Wiki.php(383): Article->view()
#6 D:\Apache Software Foundation\Apache2.2\htdocs\wiki\includes\Wiki.php(48): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
#7 D:\Apache Software Foundation\Apache2.2\htdocs\wiki\index.php(89): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
#8 {main}
Comment 1 Greg Sabino Mullane 2008-02-17 14:14:36 UTC
What version of MediaWiki was this? Have you tried the latest subversion revision? Bugs related to this issue have been fixed, so it may have already been solved.
Comment 2 Ian Harding 2008-03-03 05:55:04 UTC
    *  MediaWiki: 1.11.1
    * PHP: 5.2.2 (apache2handler)
    * PostgreSQL: PostgreSQL 8.2.6 on x86_64--netbsd, compiled by GCC gcc (GCC) 3.3.3 (NetBSD nb3 20040520) 

Still happens for me.  This is the current release, but I don't keep up with the chages in-between releases.
Comment 3 OverlordQ 2008-03-03 10:12:10 UTC
These 'should' be fixed in the latest revisions, of which 1.11.2/1.12 are due soonish (according to #mediawiki)
Comment 4 Marc A. Pelletier 2008-03-15 02:11:29 UTC
I can confirm this bug still exists in 1.11.2
Comment 5 Marc A. Pelletier 2008-03-15 02:23:24 UTC
... and in a svn checkout of 1.12  :-(
Comment 6 OverlordQ 2008-03-15 08:32:55 UTC
I've been running svn version and I can say I've never an into this problem.

Worked fine for me since atleast r28000 or thereabouts whenever I installed it.
Comment 7 Marc A. Pelletier 2008-03-15 16:12:58 UTC
That is very odd, and unlikely to be a postgres version divergence since 'YYYYMMDDHHMMSS' as a numeric value has never been a valid timestamp with timezone value as far as I can tell, and I still get

Query failed: ERROR: invalid input syntax for type timestamp with time zone: "20080315022740" in /var/www/codex/site/includes/DatabasePostgres.php on line 506

I'm running off a svn checkout of R1_12 that's currently at r32018.  Could it have been fixed in 1_11 and not in 1_12?
Comment 8 Marc A. Pelletier 2008-03-15 16:43:05 UTC
Running the 1.12 maintenance/update.php script (in 1_12 svn) apparently twiddled with the schema to fix it.  It now works for me.

Note You need to log in before you can comment on or make changes to this bug.