Yii Framework Forum: Getting: Insufficient Privilege: 7 Error - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Getting: Insufficient Privilege: 7 Error Rate Topic: -----

#1 User is offline   VINAY Kr. SHARMA 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 149
  • Joined: 13-September 11
  • Location:Gurgaon

Posted 30 January 2013 - 03:36 AM

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
VINAY Kr. SHARMA
@vinaykrsharma
Facebook ID: vinaykrsharma
Blog

Co-operation comes from friendship, friendship comes from trust, and trust comes from kind-heartedness.
0

#2 User is offline   kokomo 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 281
  • Joined: 23-July 10

Posted 30 January 2013 - 04:11 AM

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.
1

#3 User is offline   VINAY Kr. SHARMA 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 149
  • Joined: 13-September 11
  • Location:Gurgaon

Posted 31 January 2013 - 01:48 AM

View Postkokomo, on 30 January 2013 - 04:11 AM, said:

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.
VINAY Kr. SHARMA
@vinaykrsharma
Facebook ID: vinaykrsharma
Blog

Co-operation comes from friendship, friendship comes from trust, and trust comes from kind-heartedness.
0

#4 User is offline   Todd C 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 16-December 11

Posted 07 March 2013 - 12:48 PM

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 referential integrity checks every time a new one is added.


http://www.yiiframew...strainttrigger/
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users