System error

error:  Couldn't insert into logstart: ERROR: cannot insert into a view
HINT: You need an unconditional ON INSERT DO INSTEAD rule.
context: 
... 
3688:  if($respid && $srvyid){
3689:  my $dbh = DBI->connect(&srvydbinfo) or die "Can't connect to database\n";
3690:  my $insertsql = $dbh->prepare("INSERT INTO s_" . $srvyid . "_stats " .
3691:  "VALUES ($respid, 'srvystart', '$todayandnow')");
3692:  $insertsql->execute() or die "Couldn't insert into logstart: $DBI::errstr";
3693:  $insertsql->finish();
3694:  $dbh->disconnect();
3695:  }
3696:  }
... 
code stack:  /var/www/vhost/troyresearch.com/cgi/SrvyUtils.pm:3692
/var/www/vhost/troyresearch.com/cgi/srvy/1.p:524
/var/www/vhost/troyresearch.com/cgi/autohandler:15
raw error






























Couldn't insert into logstart: ERROR:  cannot insert into a view
HINT:  You need an unconditional ON INSERT DO INSTEAD rule.


Trace begun at /usr/share/perl5/HTML/Mason/Exceptions.pm line 129
HTML::Mason::Exceptions::rethrow_exception('Couldn\'t insert into logstart: ERROR:  cannot insert into a view^JHINT:  You need an unconditional ON INSERT DO INSTEAD rule.^J') called at /var/www/vhost/troyresearch.com/cgi/SrvyUtils.pm line 3692
SrvyUtils::logstart(17523, 504) called at /var/www/vhost/troyresearch.com/cgi/srvy/1.p line 524
HTML::Mason::Commands::__ANON__('source', 0010, 18057501562627993558, '', 18057501562627993558, '', 'source', 0010) called at /usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x271f6e0)', 'source', 0010, 18057501562627993558, '', 18057501562627993558, '', 'source', 0010) called at /usr/share/perl5/HTML/Mason/Request.pm line 1256
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1246
HTML::Mason::Request::comp(undef, undef, undef, 'source', 0010, 18057501562627993558, '', 18057501562627993558, '', 'source', 0010) called at /usr/share/perl5/HTML/Mason/Request.pm line 915
HTML::Mason::Request::call_next('HTML::Mason::Request::ApacheHandler=HASH(0x2aa1a60)', 18057501562627993558, '', 'source', 0010) called at /var/www/vhost/troyresearch.com/cgi/autohandler line 15
eval {...} at /var/www/vhost/troyresearch.com/cgi/autohandler line 15
HTML::Mason::Commands::__ANON__('source', 0010, 18057501562627993558, '') called at /usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x2873360)', 'source', 0010, 18057501562627993558, '') called at /usr/share/perl5/HTML/Mason/Request.pm line 1251
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1246
HTML::Mason::Request::comp(undef, undef, undef, 'source', 0010, 18057501562627993558, '') called at /usr/share/perl5/HTML/Mason/Request.pm line 460
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 460
eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 412
HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0x2aa1a60)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 165
HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0x2aa1a60)') called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 832
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x1480010)', 'Apache2::RequestRec=SCALAR(0x2aa0ae0)') called at (eval 31) line 8
HTML::Mason::ApacheHandler::handler('HTML::Mason::ApacheHandler', 'Apache2::RequestRec=SCALAR(0x2aa0ae0)') called at -e line 0
eval {...} at -e line 0