Thinkphp6 操作 PostgreSql 12出錯

瀏覽:71 發布日期:2019/10/28 分類:ThinkPHP6專區 關鍵字: postgres thinkphp6
SQLSTATE[42703]: Undefined column: 7 ERROR: column pg_attrdef.adsrc does not exist
LINE 10: pg_attrdef.adsrc AS fields_default,
^
QUERY:
SELECT
pg_attribute.attname AS fields_name,
pg_attribute.attnum AS fields_index,
pgsql_type(pg_type.typname::varchar) AS fields_type,
pg_attribute.atttypmod-4 as fields_length,
CASE WHEN pg_attribute.attnotnull THEN 'not null'
ELSE ''
END AS fields_not_null,
pg_attrdef.adsrc AS fields_default,
pg_description.description AS fields_comment
FROM
pg_attribute
INNER JOIN pg_class ON pg_attribute.attrelid = pg_class.oid
INNER JOIN pg_type ON pg_attribute.atttypid = pg_type.oid
LEFT OUTER JOIN pg_attrdef ON pg_attrdef.adrelid = pg_class.oid AND pg_attrdef.adnum = pg_attribute.attnum
LEFT OUTER JOIN pg_description ON pg_description.objoid = pg_class.oid AND pg_description.objsubid = pg_attribute.attnum
WHERE
pg_attribute.attnum > 0
AND attisdropped <> 't'
AND pg_class.oid = 16778
ORDER BY pg_attribute.attnum
CONTEXT: PL/pgSQL function table_msg(character varying,character varying) line 43 at FOR over EXECUTE statement
PL/pgSQL function table_msg(character varying) line 5 at FOR over SELECT rows
最佳答案
評論( 相關
后面還有條評論,點擊查看>>
养老时时彩计划软件