en
Language
  • en
  • cs
  • hu
  • de
  • fr
  • es
  • br
  • ru
  • kr
  • jp
AI translation
  • it
  • pl
  • tr

Troubleshooting PG::GroupingError

Introduction

This guide will help you understand and report the PG::GroupingError internal server error that may occur when using Easy8 with a PostgreSQL database. PostgreSQL is stricter than MySQL when it comes to SQL queries, especially those involving GROUP BY. This error needs to be fixed in the application code by a developer.

Target Audience

  • Administrator

Prerequisites

  • Access to your Easy8 instance
  • Access to production logs or error messages
  • Ability to upgrade Easy8 to the latest version

How to Handle PG::GroupingError

Step 1: Understand the Error

You may see an error like this in logs or on screen:

EasyQuery::StatementInvalid: PG::GroupingError:
ERROR: column "projects.lft" must appear in the GROUP BY clause or be used in an aggregate function

This happens because PostgreSQL requires all selected columns in a grouped query to be:

  • Present in the GROUP BY clause, or
  • Used inside an aggregate function (like SUM, MAX, etc.)

MySQL is more lenient, so this issue usually appears only with PostgreSQL.

Step 2: Identify Where the Error Occurs

To help developers fix the issue:

  • Try to reproduce the error in the app interface.
  • Note the URL of the page where the error occurs.
  • Check and save the relevant section of the production.log file.
  • Look for any specific user actions or filters that trigger the problem.

Step 3: Upgrade to the Latest Version

If possible, upgrade Easy8 to the most recent version. The error may already be fixed in a newer release.

  • Go to the Client Zone and download the latest version.
  • Follow standard upgrade procedures for your environment.

Step 4: Report to Support (If Error Persists)

If the issue remains even after updating:

This will help the development team address the issue in future releases.

Conclusion

The PG::GroupingError is specific to PostgreSQL’s strict SQL handling. It requires a fix in the application code, but you can help by identifying when and where it happens. Updating to the latest Easy8 version may resolve the issue. If not, detailed reporting will support a faster fix.

Related Topics and Further Reading

Try Easy8 in 30 days free trial

Access all features, SSL protected, no credit card required.