top-think / top-think/think-orm

postgresql14报错

Open
#350 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

PostgreSQL
Dominant language
PHP
Stars
437
Forks
188
PR merge metrics
No merged PRs in 30d

Description

Uncaught think\db\exception\PDOException: 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 = 16431 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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the PostgreSQL schema-introspection path that invokes the table_msg PL/pgSQL function and inspect the reported query, especially pg_attrdef.adsrc. Done means PostgreSQL 14 table introspection no longer raises the reported undefined-column error; the payload names no file or test, so locate the relevant entry point and verification coverage first.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, postgresql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.