Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-15496

SQL Error in PostgreSQL Fulltext search when results displayed as topics

XMLWordPrintable

    Error rendering 'com.atlassian.jira.jira-view-issue-plugin:details-module'. Please contact your Jira administrators.

      When issuing a SELECT DISTINCT ... ORDER BY, PostgreSQL requires that the column being ordered also appears in the SELECT statement. The phpBB Postgres fulltext search backend issues a SELECT DISTINCT when displaying results as topic, but does not add the sorted column to the SELECT, resulting in the error:

      ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list LINE 5: ORDER BY t.topic_last_post_time DESC ^ []

      To reproduce:

      1. Have a forum using PostgreSQL as its database, and the search backend as PostgreSQL Fulltext.
      2. Perform any kind of search with 'Display results as:' set to Topics.

            Marc Marc
            Void Chicken Void Chicken [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: