Not sure if it's a bug or I just don't know how to do it properly.
I have following table in Postgres:
CREATE TABLE "Report" (
id serial NOT NULL,
description text NOT NULL,
"createdOn" integer NOT NULL
Trying to get all reports ordered by createdOn DESC:
$criteria->order = '"createdOn" DESC';
CDbCommand failed to execute the SQL statement: SQLSTATE: Grouping error: 7 ERROR: column "Report.createdOn" must appear in the GROUP BY clause or be used in an aggregate function
So it escapes table name along with column name.
"Report.createdOn" should be "Report"."createdOn".
Arent all columns in postgres converted to lowercase by the database? If so your criteria order clause should be ‘“createdon” DESC’;