Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-15496

SQL Error in PostgreSQL Fulltext search when results displayed as topics

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.2.1
    • 3.2.2
    • Search
    • PHP 7.0.19, PostgreSQL 9.6, Debian 9

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: