1

I have changed my applicaiton database from mysql to postgres since this the rights module is giving exception:

`CDbCommand failed to execute the SQL statement: SQLSTATE[42P01]: Undefined table: 7 
 ERROR: relation "authitem" does not exist
LINE 2: FROM AuthItem t1
^. The SQL statement executed was: SELECT
name,t1.type,description,t1.bizrule,t1.data,weight
FROM AuthItem t1
LEFT JOIN Rights t2 ON name=itemname
ORDER BY t1.type DESC, weight ASC `

I have reviewed the tables names and it's exactly the same 'case senstive'.

XDeveloper
  • 11
  • 1

1 Answers1

1

If the table name in the database is AuthItem not authitem the query should be:

FROM "AuthItem" t1

Note the double quotes.

It looks like whatever you're using created the table as CREATE TABLE "AuthItem" but then queries it as SELECT ... FROM AuthItem. These are different things. Yes, that's confusing, but that's what the SQL standard says - case is folded on unquoted identifiers, and preserved on quoted identifiers.

Craig Ringer
  • 307,061
  • 76
  • 688
  • 778