I am wanting to get this module working with postgres. It is almost working, but having some issues... Compensation is available, if someone can help...

errors...

* warning: pg_query() [function.pg-query]: Query failed: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list in /usr/share/drupal/includes/database.pgsql.inc on line 84.
* user warning: query: SELECT DISTINCT(n.nid), n.title FROM node n INNER JOIN video v ON n.vid = v.vid INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = -1 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'tac_lite'))) AND n.type = 'video' AND n.status = 1 AND n.moderate = 0 ORDER BY n.created DESC LIMIT 10 OFFSET 0 in /usr/share/drupal/includes/database.pgsql.inc on line 110.
* warning: pg_query() [function.pg-query]: Query failed: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list in /usr/share/drupal/includes/database.pgsql.inc on line 84.
* user warning: query: SELECT DISTINCT(n.nid), n.title FROM node n INNER JOIN video v ON n.vid = v.vid INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = -1 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'tac_lite'))) AND n.type = 'video' AND n.status = 1 AND n.moderate = 0 ORDER BY RAND() DESC LIMIT 1 OFFSET 0 in /usr/share/drupal/includes/database.pgsql.inc on line 110.

CommentFileSizeAuthor
#4 pgsql.patch_0.txt2.63 KBfax8
#3 pgsql.patch.txt1.74 KBfax8

Comments

JamieR’s picture

Category: feature » bug

This module is not currently working in a postgresql environment.

fax8’s picture

The attached patch add support for PostgreSQL for video module for 4.7.

The errors you are getting are probably not related to the video module.
I think that are related to the code of some access module.

Fabio

fax8’s picture

StatusFileSize
new1.74 KB

here is the patch

fax8’s picture

StatusFileSize
new2.63 KB

this patch should fix the original author problems with SELECT and ORDER BY.

fax8’s picture

Status: Active » Fixed

Patch committed to HEAD and 4.7

Fabio

Anonymous’s picture

Status: Fixed » Closed (fixed)