Page MenuHomePhabricator

Add Postgres support to ArticleFeedback
Closed, DeclinedPublic

Description

Author: sam.halliday

Description:
When attempting to run the maintenance/update.php script on mediawiki 1.17.0 and the latest SVN of all the ArticleFeedback dependencies, I see the following error (even if I run the script several times)

Creating click_tracking table...PHP Warning: pg_query(): Query failed: ERROR: syntax error at or near "NOT"
LINE 1: ...Tracking/patches/ClickTracking.sql ) */ TABLE IF NOT EXISTS...

^ in /path/to/includes/db/DatabasePostgres.php on line 237

A database query syntax error has occurred.
The last attempted database query was:
"CREATE TABLE IF NOT EXISTS click_tracking (
action_time char(14) NOT NULL,
session_id varbinary(255) NOT NULL,
is_logged_in tinyint NOT NULL,
user_total_contribs integer,
user_contribs_span1 integer,
user_contribs_span2 integer,
user_contribs_span3 integer,
namespace integer NOT NULL,
event_id integer NOT NULL,
additional_info varbinary(255)
) /*$wgDBTableOptions*/
"
from within function "DatabaseBase::sourceFile( /path/to/extensions/ClickTracking/patches/ClickTracking.sql )".
Database returned error "1: ERROR: syntax error at or near "NOT"
LINE 1: ...Tracking/patches/ClickTracking.sql ) */ TABLE IF NOT EXISTS...


Version: unspecified
Severity: enhancement
Whiteboard: wikimedia[unmaintained]

Details

Reference
bz30678
TitleReferenceAuthorSource BranchDest Branch
Block egress for evaluators and add test demonstrating that egress rules prevent external calls in the evaluators.repos/abstract-wiki/aw-ci-chart!11apineegressmain
lima-kilo: introduce chrootrepos/cloud/toolforge/lima-kilo!13aborreroarturo-isolationmain
kind: manage k8s API portrepos/cloud/toolforge/lima-kilo!11aborreroarturomain
k8s: fake_maintain_kubeusers: assert if the kubernetes_ca is emptyrepos/cloud/toolforge/lima-kilo!10aborreroarturomain
lima-kilo: add more robust userconfig supportrepos/cloud/toolforge/lima-kilo!6aborreroarturomain
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:52 PM
bzimport added a project: ArticleFeedback.
bzimport set Reference to bz30678.
bzimport added a subscriber: Unknown Object (MLST).

sam.halliday wrote:

Furthermore, if I edit the patch to force create the table (by removing IF NOT EXISTS), then I get the following error (varbinary isn't recognised)

Creating click_tracking table...PHP Warning: pg_query(): Query failed: ERROR: type "varbinary" does not exist
LINE 3: session_id varbinary(255) NOT NULL,

^ in /path/to/includes/db/DatabasePostgres.php on line 237

A database query syntax error has occurred.
The last attempted database query was:
"CREATE TABLE click_tracking (
action_time char(14) NOT NULL,
session_id varbinary(255) NOT NULL,
is_logged_in tinyint NOT NULL,
user_total_contribs integer,
user_contribs_span1 integer,
user_contribs_span2 integer,
user_contribs_span3 integer,
namespace integer NOT NULL,
event_id integer NOT NULL,
additional_info varbinary(255)
) /*$wgDBTableOptions*/
"
from within function "DatabaseBase::sourceFile( /path/to/extensions/ClickTracking/patches/ClickTracking.sql )".
Database returned error "1: ERROR: type "varbinary" does not exist
LINE 3: session_id varbinary(255) NOT NULL,

sam.halliday wrote:

Looks like similar issues exist in other files, e.g. ClickTrackingEvents.sql.

Also, tinyint isn't valid for postgresql.

This extension simply doesn't support PG, rephrasing summary.

sam.halliday wrote:

That's a real shame - unless you're doing something really fancy with the DB then adding support shouldn't be too much trouble. I hope you consider PG support shortly as the extension looks great.

I think this bug report should be split into two separate feature requests: one for Clicktracking and one for ArticleFeedback.

ClickTracking is going to DIEEEE

ArticleFeedback (<=4) also going to die.
Should this report be moved to the AFTv5 component instead?

The extension homepage at [[mw:Extension:ArticleFeedback]] says
"This extension has been archived. This extension has not been maintained in some time, and no longer supports recent releases of MediaWiki.
The following other choices are still available: [[mw:Extension:ArticleFeedbackv5]]"

Furthermore, ArticleFeedback (version 4 or earlier) was removed from all Wikimedia wikis in https://gerrit.wikimedia.org/r/#/c/98074/

It is currently unlikely that there will be any further active development of ArticleFeedback (version 4 or earlier).
Closing this report as WONTFIX to reflect reality.
Please feel free to reopen this report in the future if anyone takes the responsibility for active development of ArticleFeedback (version 4 or earlier) again.

Thank you for reporting this bug and we are sorry it could not be fixed.