Getting: Insufficient Privilege: 7 Error

Hello,

While running test. I’m getting this exception:




TermTest::testIndex()

CDbException: CDbCommand failed to execute the SQL statement: SQLSTATE[42501]: Insufficient privilege: 7 ERROR:  permission denied: "RI_ConstraintTrigger_33494" is a system trigger

/var/www/yii/framework/db/CDbCommand.php:357

/var/www/yii/framework/db/schema/pgsql/CPgsqlSchema.php:96

/var/www/yii/framework/test/CDbFixtureManager.php:234

/var/www/yii/framework/test/CDbFixtureManager.php:115

/var/www/yii/framework/test/CDbFixtureManager.php:87

/var/www/yii/framework/base/CModule.php:387

/var/www/yii/framework/test/CDbTestCase.php:85

/var/www/yii/framework/test/CDbTestCase.php:117


Full output can be found in Output window.



Any idea how to fix it.

Database I’m using PostgreSQL 9.1

Thanks

Grant your yii db user (specified in config) the rights to execute the RI_ConstraintTrigger_33494.

Don’t know without your relevant test code why this system trigger is fired.

Thanks it works.

A good explanation of this problem and a workaround by extending CPgsqlSchema can be found in the thread at the link below. I’m mentioning it here because I think it’s a better solution than granting rights to individual [color=#1C2837][size=3]referential integrity checks every time a new one is added.[/size][/color]

[color="#1c2837"][size=3]

[/size][/color]

http://www.yiiframework.com/forum/index.php/topic/11135-postgres-fixtures-bug-ri-constrainttrigger/