Page MenuHomePhabricator

Oversight doesn't provide a database definition for PostgreSQL
Closed, ResolvedPublic

Description

The Oversight extension only supports MySQL; a version of hidden.sql for PostgreSQL is needed for installations based on that database to be supported.

(Mark this lowest priority as far as I'm concerned, I just wanted to see how Oversight works)


Version: unspecified
Severity: enhancement

Details

Reference
bz15834

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:22 PM
bzimport set Reference to bz15834.

Created a hidden.pg.sql (r41854) file that loads properly. Have not tested the extension itself in use.

Created attachment 5405
Patch correcting the issues described.

One critique: the hidden_timestamp and hidden_on_timestamp columns should probably be TIMESTAMPTZ rather than text. MySQL seems to lack a functional date-and-time type, but PG has one.

It works for hiding live revisions, but fails when trying to hide a deleted revision. The attached patch fixes it, by passing timestamps through the needed conversion functions and by using the SQL-standard '' rather than "" to represent an empty string in one query. It also converts the two database columns to TIMESTAMPTZ; if that is a concern than the appropriate magic would need to be added to convert any existing PG installations of the extension.

Attached:

Thanks! Patch applied. Sorry for not catching that timestamp stuff. If it's any consolation, the MySQL schema is wrong too (e.g. int(5) is not what people think it is :)

Please reopen if there are further issues.

Jdforrester-WMF subscribed.

Migrating from the old tracking task to a tag for PostgreSQL-related tasks.