category.inc incompatible with pgsql.

PMunn - February 26, 2007 - 15:20
Project:Category
Version:6.x-2.0-beta3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

category.inc line 833 did not include all the columns mentioned in the Order By within the Select list as required by standard SQL and PostgreSQL.

The attached patch takes care of this.

AttachmentSize
category.inc_.pgsql_support.20070226.patch1.09 KB

#1

PMunn - March 27, 2007 - 15:58

I just took a look at the March 6th dev release and this bug is still present in the source code. If anyone would like to take a look and give the patch (or a new one that does the same thing) a chance, I'd appreciate it.

#2

PMunn - August 1, 2007 - 01:58

This bug is still present in the 2007-07-16 5.x-1.x-dev version.

#3

PMunn - August 9, 2007 - 01:24

The bug is still there in the August 6th release. (Is this annoying? Please examine and apply the patch, or suggest an alternative.)

#4

JirkaRybka - June 6, 2009 - 00:15
Version:5.x-1.x-dev» 6.x-2.0-beta3
Priority:critical» normal
Status:needs review» needs work

After nearly 2 years, the 6.x-2.0-beta3 release seems to have the same, still (category.inc, line 72). I can't test on PgSQL, but it would not hurt to roll a small patch, still. One thing we should be careful about, is that we don't add columns with the same name as already retrieved from a different table, effectively overriding the values with something unneeded. I would say, just alias the added columns.

Taking down from critical, since no-one cared for 2 years...

#5

JirkaRybka - June 7, 2009 - 14:11
Status:needs work» closed

In fact, this issue only just shows how old stuff may be found in the Category queue. This is not a problem for quite a while now:

PgSQL 6.5 (archive) documentation - SELECT:

From release 6.4 of PostgreSQL, the columns in the ORDER BY clause do not need to appear in the SELECT clause. Thus the following statement is now legal:

SELECT name FROM distributors ORDER BY code;

Drupal 6 now requires PgSQL 7.4 minimum, so the problem doesn't exist anymore.

Closing this issue.

 
 

Drupal is a registered trademark of Dries Buytaert.