[rt-devel] RT 4.2.7: SQL error on ticket traffic

Alex Vandiver alexmv at bestpractical.com
Fri Sep 26 16:37:17 EDT 2014

On 09/26/2014 04:19 PM, Brian McNally wrote:
> Note that the statement works fine for me on one RT 4.2.7 instance and
> fails on the other. The difference in configuration is the original
> database I was migrating from (a 3.6.6 RT instance). The DB upgrade
> process for both was similar without any critical errors.

As the SQL statement runs successfully in one place, and not in the
other, I'm asking you to compare:

 1. Database schemas for the two instances
 2. Postgres configurations for the two instances

Note that this appears to be a failure of "GROUP BY id" to properly note
that id is a unique index, and as such is sufficient -- rather than
having to list all columns.  The logic to support this was originally
introduced in PostgreSQL 9.1, and DBIx::SearchBuilder 1.66 now takes
advantage of it if possible.  If that "GROUP BY" doesn't work for you,
it implies that:
  1. You Scrips table somehow doesn't have "id" as a unique index
  2. You're not actually running PostgreSQL 9.1 or higher (check client
vs server libraries?)
  3. Your PostgreSQL has somehow disabled this optimization

That is what I mean by "check your postgres configuration."
 - Alex

More information about the rt-devel mailing list