We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

Bug 2907 - PostgreSQL ordering and untyped columns
PostgreSQL ordering and untyped columns
Status: RESOLVED FIXED
Product: OJS
Classification: Unclassified
Component: General
2.2
PC Linux
: P1 normal
Assigned To: Alec Smecher
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-08 13:50 PDT by Alec Smecher
Modified: 2007-06-11 17:32 PDT (History)
1 user (show)

See Also:
Version Reported In:
Also Affects:


Attachments
Patch against pre-2.2 CVS (1.68 KB, patch)
2007-06-08 13:53 PDT, Alec Smecher
Details | Diff
Patch against pre-2.2 CVS (1.54 KB, patch)
2007-06-11 10:24 PDT, Alec Smecher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alec Smecher 2007-06-08 13:50:48 PDT
When using "SELECT DISTINCT NULL AS colName, ... FROM ...", PostgreSQL complains because of the implicit attempt to sort an untyped column. Try using '' instead of null. (getAuthorsAlphabetizedByJournal in classes/article/AuthorDAO.inc.php affected.)
Comment 1 Alec Smecher 2007-06-08 13:53:09 PDT
Created attachment 206 [details]
Patch against pre-2.2 CVS
Comment 2 Alec Smecher 2007-06-08 13:53:34 PDT
Leaving issue open pending feedback.
Comment 3 Alec Smecher 2007-06-11 10:24:52 PDT
Created attachment 208 [details]
Patch against pre-2.2 CVS
Comment 4 Alec Smecher 2007-06-11 15:42:13 PDT
This appears to be specific to PostgreSQL < 7.4. Attachment #208 [details] should provide a PostgreSQL-specific work-around while something more generic is being devised.
Comment 5 Alec Smecher 2007-06-11 17:32:59 PDT
Committed attachment #208 [details] as generic solution -- this is standard SQL, although it's only necessary for PostgreSQL < 7.4.