CDbException

CDbCommand konnte das SQL-Statement nicht ausführen: SQLSTATE[42804]: Datatype mismatch: 7 ERROR: UNION types "char" and text cannot be matched
LINE 21: CASE WHEN indisprimary THEN
^. The SQL statement executed was: SELECT
conname,
consrc,
contype,
indkey
FROM (
SELECT
conname,
pg_catalog.pg_get_constraintdef(oid) AS consrc,
contype,
conrelid AS relid,
NULL AS indkey
FROM
pg_catalog.pg_constraint
WHERE
contype IN ('f', 'c')
UNION ALL
SELECT
pc.relname,
NULL,
CASE WHEN indisprimary THEN
'p'
ELSE
'u'
END,
pi.indrelid,
indkey
FROM
pg_catalog.pg_class pc,
pg_catalog.pg_index pi
WHERE
pc.oid=pi.indexrelid
AND EXISTS (
SELECT 1 FROM pg_catalog.pg_depend d JOIN pg_catalog.pg_constraint c
ON (d.refclassid = c.tableoid AND d.refobjid = c.oid)
WHERE d.classid = pc.tableoid AND d.objid = pc.oid AND d.deptype = 'i' AND c.contype IN ('u', 'p')
)
) AS sub
WHERE relid = (SELECT oid FROM pg_catalog.pg_class WHERE relname=:table
AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace
WHERE nspname=:schema))

/data/kunden/021/limesurvey/vendor/yiisoft/yii/framework/db/CDbCommand.php(543)

531         {
532             if($this->_connection->enableProfiling)
533                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
534 
535             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
536             $message=$e->getMessage();
537             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
538                 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
539 
540             if(YII_DEBUG)
541                 $message.='. The SQL statement executed was: '.$this->getText().$par;
542 
543             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
544                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
545         }
546     }
547 
548     /**
549      * Builds a SQL SELECT statement from the given query specification.
550      * @param array $query the query specification in name-value pairs. The following
551      * query options are supported: {@link select}, {@link distinct}, {@link from},
552      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
553      * {@link limit}, {@link offset} and {@link union}.
554      * @throws CDbException if "from" key is not present in given query parameter
555      * @return string the SQL statement

Stack Trace

#4
+
 /data/kunden/021/limesurvey/application/core/LSYii_Application.php(179): CDbSchema->getTable()
174         /* encrypt emailsmtppassword value, because emailsmtppassword in database is also encrypted
175            it would be decrypted in LimeMailer when needed */
176         $this->config['emailsmtppassword'] = LSActiveRecord::encryptSingle($this->config['emailsmtppassword']);
177 
178         /* Check DB : let throw error if DB is broken issue #14875 */
179         $settingsTableExist = Yii::app()->db->schema->getTable('{{settings_global}}');
180         /* No table settings_global : not installable or updatable */
181         if (empty($settingsTableExist)) {
182             /* settings_global was created before 1.80 : not updatable version or not installed (but table exist) */
183             Yii::log("LimeSurvey table settings_global not found in database", 'error');
184             throw new CDbException("LimeSurvey table settings_global not found in database");
#5
+
 /data/kunden/021/limesurvey/application/core/LSYii_Application.php(93): LSYii_Application->setConfigs()
88 
89         /* Construct CWebApplication */
90         parent::__construct($aApplicationConfig);
91 
92         /* Because we have app now : we have to call again the config (usage of Yii::app() for publicurl) */
93         $this->setConfigs();
94         /* Since session can be set by DB : need to be set again … */
95         $this->setSessionByDB($aApplicationConfig);
96 
97         /* Update asset manager path and url only if not directly set in aApplicationConfig (from config.php),
98          *  must do after reloading to have valid publicurl (the tempurl) */
#7
+
 /data/kunden/021/limesurvey/index.php(192): YiiBase::createApplication()
187 require_once APPPATH . 'core/LSYii_Application' . EXT;
188 
189 $config = require_once(APPPATH . 'config/internal' . EXT);
190 
191 Yii::$enableIncludePath = false;
192 Yii::createApplication('LSYii_Application', $config)->run();
193 
194 /* End of file index.php */
195 /* Location: ./index.php */
2023-02-03 18:01:53 nginx/1.23.3 Yii Framework/1.1.26